fix some typos ... it works!
need to add support for delay and loop still
This commit is contained in:
parent
75da1472e8
commit
f2ab0ab374
|
@ -1,6 +1,7 @@
|
||||||
21/9/18 started 8.8.0
|
21/9/18 started 8.8.0
|
||||||
- much faster smartcrop [lovell]
|
- much faster smartcrop [lovell]
|
||||||
- add low/high to smartcrop [jcupitt]
|
- add low/high to smartcrop [jcupitt]
|
||||||
|
- add animated webp write [jcupitt]
|
||||||
|
|
||||||
23/9/18 started 8.7.1
|
23/9/18 started 8.7.1
|
||||||
- update function list in docs [janko-m]
|
- update function list in docs [janko-m]
|
||||||
|
|
|
@ -183,13 +183,13 @@ vips_webp_write_append( VipsWebPWrite *write,
|
||||||
/* Yuk! Sadly libwebp does not have a proper interface to this type.
|
/* Yuk! Sadly libwebp does not have a proper interface to this type.
|
||||||
*/
|
*/
|
||||||
pic.custom_ptr = (void *) &write->memory_writer;
|
pic.custom_ptr = (void *) &write->memory_writer;
|
||||||
if( WebPMemoryWrite( data, data_size, &pic ) ) {
|
if( !WebPMemoryWrite( data, data_size, &pic ) ) {
|
||||||
vips_error( "webp",
|
vips_error( "webp",
|
||||||
"%s", _( "output webp image too large" ) );
|
"%s", _( "output webp image too large" ) );
|
||||||
return( 0 );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
return( 1 );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We don't actually use libwebpmux here, but we shouldn't attach metadata we
|
/* We don't actually use libwebpmux here, but we shouldn't attach metadata we
|
||||||
|
@ -391,8 +391,13 @@ write_webp_anim( VipsWebPWrite *write, VipsImage *image, int page_height )
|
||||||
|
|
||||||
/* Add a last fake frame to signal the last duration.
|
/* Add a last fake frame to signal the last duration.
|
||||||
*/
|
*/
|
||||||
if( !WebPAnimEncoderAdd( write->enc, NULL, timestamp_ms, NULL ) ||
|
if( !WebPAnimEncoderAdd( write->enc, NULL, timestamp_ms, NULL ) ) {
|
||||||
WebPAnimEncoderAssemble( write->enc, &webp_data ) ) {
|
vips_error( "vips2webp",
|
||||||
|
"%s", _( "anim build error" ) );
|
||||||
|
return( -1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !WebPAnimEncoderAssemble( write->enc, &webp_data ) ) {
|
||||||
vips_error( "vips2webp",
|
vips_error( "vips2webp",
|
||||||
"%s", _( "anim build error" ) );
|
"%s", _( "anim build error" ) );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
@ -547,9 +552,9 @@ vips_webp_add_metadata( VipsWebPWrite *write, VipsImage *image )
|
||||||
*/
|
*/
|
||||||
new_size = old_size - 8 + (is_vp8x ? 0 : 18) + metadata_size;
|
new_size = old_size - 8 + (is_vp8x ? 0 : 18) + metadata_size;
|
||||||
|
|
||||||
write->memory_writer.mem = NULL;
|
/* We've taken a copy of the pointer already.
|
||||||
write->memory_writer.size = 0;
|
*/
|
||||||
write->memory_writer.max_size = 0;
|
WebPMemoryWriterInit( &write->memory_writer );
|
||||||
|
|
||||||
if( !vips_webp_write_appendcc( write, "RIFF" ) ||
|
if( !vips_webp_write_appendcc( write, "RIFF" ) ||
|
||||||
!vips_webp_write_appendle32( write, new_size ) ||
|
!vips_webp_write_appendle32( write, new_size ) ||
|
||||||
|
|
Loading…
Reference in New Issue