bump min libwebpmux version
0.3 can't read 0.5 libwebp files argh
This commit is contained in:
parent
bf7f1cd9a4
commit
5cc9229882
4
TODO
4
TODO
@ -1,6 +1,4 @@
|
|||||||
- test with libwebp 0.3, the earliest that supports libwebpmux
|
- test under valgrind
|
||||||
|
|
||||||
test under valgrind
|
|
||||||
|
|
||||||
|
|
||||||
- not sure about utf8 error messages on win
|
- not sure about utf8 error messages on win
|
||||||
|
@ -783,8 +783,12 @@ if test x"$with_libwebp" != "xno"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# webp has the stuff for pulling out ICC profile etc in a separate library
|
# webp has the stuff for pulling out ICC profile etc in a separate library
|
||||||
|
#
|
||||||
|
# we can build with libwebpmux back to 0.3, but it's not until libwebp 0.5 that
|
||||||
|
# we can read that metadata back successfully ... insist on 0.5 so that tests
|
||||||
|
# can work smoothly
|
||||||
if test x"$with_libwebp" != "xno"; then
|
if test x"$with_libwebp" != "xno"; then
|
||||||
PKG_CHECK_MODULES(LIBWEBPMUX, libwebpmux >= 0.3.0,
|
PKG_CHECK_MODULES(LIBWEBPMUX, libwebpmux >= 0.5.0,
|
||||||
[AC_DEFINE(HAVE_LIBWEBPMUX,1,[define if you have libwebpmux installed.])
|
[AC_DEFINE(HAVE_LIBWEBPMUX,1,[define if you have libwebpmux installed.])
|
||||||
with_libwebpmux=yes
|
with_libwebpmux=yes
|
||||||
PACKAGES_USED="$PACKAGES_USED libwebpmux"
|
PACKAGES_USED="$PACKAGES_USED libwebpmux"
|
||||||
|
@ -237,12 +237,15 @@ read_header( Read *read, VipsImage *out )
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* We have to parse the whole file again to get the metadata 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.
|
||||||
*/
|
*/
|
||||||
bitstream.bytes = read->data;
|
bitstream.bytes = read->data;
|
||||||
bitstream.size = read->length;
|
bitstream.size = read->length;
|
||||||
if( !(mux = WebPMuxCreate( &bitstream, 0 )) ) {
|
if( !(mux = WebPMuxCreate( &bitstream, 0 )) ) {
|
||||||
vips_error( "webp", "%s", _( "parse error" ) );
|
vips_warn( "webp", "%s", _( "unable to read image metadata" ) );
|
||||||
return( -1 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
for( i = 0; i < vips__n_webp_names; i++ ) {
|
for( i = 0; i < vips__n_webp_names; i++ ) {
|
||||||
@ -288,8 +291,10 @@ vips__webp_read_file_header( const char *filename, VipsImage *out, int shrink )
|
|||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( read_header( read, out ) )
|
if( read_header( read, out ) ) {
|
||||||
|
read_free( read );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
}
|
||||||
|
|
||||||
read_free( read );
|
read_free( read );
|
||||||
|
|
||||||
@ -356,8 +361,10 @@ vips__webp_read_buffer_header( const void *buf, size_t len, VipsImage *out,
|
|||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( read_header( read, out ) )
|
if( read_header( read, out ) ) {
|
||||||
|
read_free( read );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
}
|
||||||
|
|
||||||
read_free( read );
|
read_free( read );
|
||||||
|
|
||||||
|
@ -372,8 +372,8 @@ class TestForeign(unittest.TestCase):
|
|||||||
|
|
||||||
self.file_loader("webpload", self.webp_file, webp_valid)
|
self.file_loader("webpload", self.webp_file, webp_valid)
|
||||||
self.buffer_loader("webpload_buffer", self.webp_file, webp_valid)
|
self.buffer_loader("webpload_buffer", self.webp_file, webp_valid)
|
||||||
self.save_load_buffer("webpsave_buffer", "webpload_buffer", self.colour,
|
self.save_load_buffer("webpsave_buffer", "webpload_buffer",
|
||||||
50)
|
self.colour, 60)
|
||||||
self.save_load("%s.webp", self.colour)
|
self.save_load("%s.webp", self.colour)
|
||||||
|
|
||||||
# test lossless mode
|
# test lossless mode
|
||||||
|
Loading…
Reference in New Issue
Block a user