Adds the "-thumbnail" option, that works like the current "-subifd"
option, but only for non-full-sized images.
This is particularly useful for DNG images (see next commit) that
have SubIFDs that are not necessarily thumbnails.
Signed-off-by: Nick Renieris <velocityra@gmail.com>
/** whether we should process this multi-page IFD's next page */
retry_for_page=s->get_page&&s->cur_page+1<s->get_page;// get_page is 1-indexed
if(retry_for_page){
@ -1670,6 +1680,7 @@ static av_cold int tiff_end(AVCodecContext *avctx)
#define OFFSET(x) offsetof(TiffContext, x)
staticconstAVOptiontiff_options[]={
{"subimage","decode subimage instead if available",OFFSET(get_subimage),AV_OPT_TYPE_BOOL,{.i64=0},0,1,AV_OPT_FLAG_DECODING_PARAM|AV_OPT_FLAG_VIDEO_PARAM},
{"thumbnail","decode embedded thumbnail subimage instead if available",OFFSET(get_thumbnail),AV_OPT_TYPE_BOOL,{.i64=0},0,1,AV_OPT_FLAG_DECODING_PARAM|AV_OPT_FLAG_VIDEO_PARAM},
{"page","page number of multi-page image to decode (starting from 1)",OFFSET(get_page),AV_OPT_TYPE_INT,{.i64=0},0,UINT16_MAX,AV_OPT_FLAG_DECODING_PARAM|AV_OPT_FLAG_VIDEO_PARAM},