diff --git a/TODO b/TODO index 107925ec..aafde26a 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,3 @@ -- can't read all frames of a gif, we get n_frames = 1 - - if all_frames is set, we need to set image_info->number_scenes to something - big - - would -1 work for all frames? - - add tests: load 1 page of a pdf/gif diff --git a/libvips/foreign/magick7load.c b/libvips/foreign/magick7load.c index 06e6968b..0e94718f 100644 --- a/libvips/foreign/magick7load.c +++ b/libvips/foreign/magick7load.c @@ -605,12 +605,15 @@ vips_foreign_load_magick7_fill_region( VipsRegion *or, r->left, line, r->width, 1, magick7->exception ); g_mutex_unlock( magick7->lock ); - q = VIPS_REGION_ADDR( or, r->left, top ); - if( !p ) { - vips_foreign_load_magick7_error( magick7 ); - return( -1 ); - } + if( !p ) + /* This can happen if, for example, some frames of a + * gif are shorter than others. It's not always + * an error. + */ + continue; + + q = VIPS_REGION_ADDR( or, r->left, top ); switch( im->BandFmt ) { case VIPS_FORMAT_UCHAR: