better all_frames on gif sources

some frames can be missing some lines
This commit is contained in:
John Cupitt 2016-08-14 17:39:01 +01:00
parent 9143bda915
commit 20298b0d9a
2 changed files with 8 additions and 12 deletions

7
TODO
View File

@ -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

View File

@ -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: