read the loop count
This commit is contained in:
parent
e106e1d100
commit
226f6e4f09
@ -232,6 +232,7 @@ read_header( Read *read, VipsImage *out )
|
||||
{
|
||||
WebPData bitstream;
|
||||
WebPMux *mux;
|
||||
WebPMuxAnimParams params;
|
||||
int i;
|
||||
|
||||
vips_image_init_fields( out,
|
||||
@ -246,7 +247,7 @@ read_header( Read *read, VipsImage *out )
|
||||
/* We have to parse the whole file again to get the metadata out.
|
||||
*
|
||||
* Don't make parse failure an error. We don't want to refuse to read
|
||||
* any pixels because of some malformed metadata.
|
||||
* pixels because of some malformed metadata.
|
||||
*/
|
||||
bitstream.bytes = read->data;
|
||||
bitstream.size = read->length;
|
||||
@ -255,6 +256,9 @@ read_header( Read *read, VipsImage *out )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
if( WebPMuxGetAnimationParams( mux, ¶ms ) == WEBP_MUX_OK )
|
||||
vips_image_set_int( out, "gif-loop", params.loop_count );
|
||||
|
||||
for( i = 0; i < vips__n_webp_names; i++ ) {
|
||||
const char *vips = vips__webp_names[i].vips;
|
||||
const char *webp = vips__webp_names[i].webp;
|
||||
|
Loading…
Reference in New Issue
Block a user