fix gif-loop metadata
thanks Christian Stocker
This commit is contained in:
parent
5361903fae
commit
7aed4c04e7
@ -579,10 +579,24 @@ vips_foreign_load_gif_page( VipsForeignLoadGif *gif, VipsImage *out )
|
|||||||
if( ext_code == APPLICATION_EXT_FUNC_CODE &&
|
if( ext_code == APPLICATION_EXT_FUNC_CODE &&
|
||||||
extension &&
|
extension &&
|
||||||
extension[0] == 11 &&
|
extension[0] == 11 &&
|
||||||
/* Then 'NETSCAPE2.0', then */
|
vips_isprefix( "NETSCAPE2.0",
|
||||||
extension[12] == 3 &&
|
(const char *) (extension + 1) ) ) {
|
||||||
extension[13] == 1 )
|
while( extension != NULL ) {
|
||||||
gif->loop = extension[14] | (extension[15] << 8);
|
if( DGifGetExtensionNext( gif->file,
|
||||||
|
&extension ) == GIF_ERROR ) {
|
||||||
|
vips_foreign_load_gif_error(
|
||||||
|
gif );
|
||||||
|
return( -1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( extension &&
|
||||||
|
extension[0] == 3 &&
|
||||||
|
extension[1] == 1 ) {
|
||||||
|
gif->loop = extension[2] |
|
||||||
|
(extension[3] << 8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while( extension != NULL ) {
|
while( extension != NULL ) {
|
||||||
if( DGifGetExtensionNext( gif->file,
|
if( DGifGetExtensionNext( gif->file,
|
||||||
|
Loading…
Reference in New Issue
Block a user