fix pngload with libpng >=1.6.11
thaks Lovell
This commit is contained in:
parent
2e8217338b
commit
296eb8b54e
@ -9,6 +9,7 @@
|
||||
- vipsthumbnail shrinks to 1/2 window_size: faster and better quality
|
||||
- vipsthumbnail defaults to bicubic + nosharpen
|
||||
- better rounding behaviour for fixed-point bicubic reduces noise
|
||||
- fix pngload with libpng >=1.6.11
|
||||
|
||||
4/7/14 started 7.40.4
|
||||
- fix vips_rawsave_fd(), thanks aferrero2707
|
||||
|
@ -48,6 +48,8 @@
|
||||
* still set color_type to alpha
|
||||
* 16/7/13
|
||||
* - more robust error handling from libpng
|
||||
* 9/8/14
|
||||
* - don't check profiles, helps with libpng >=1.6.11
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -188,6 +190,13 @@ read_new( VipsImage *out, gboolean readbehind )
|
||||
user_error_function, user_warning_function )) )
|
||||
return( NULL );
|
||||
|
||||
#ifdef PNG_SKIP_sRGB_CHECK_PROFILE
|
||||
/* Prevent libpng (>=1.6.11) verifying sRGB profiles.
|
||||
*/
|
||||
png_set_option( read->pPng,
|
||||
PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON );
|
||||
#endif /*PNG_SKIP_sRGB_CHECK_PROFILE*/
|
||||
|
||||
/* Catch PNG errors from png_create_info_struct().
|
||||
*/
|
||||
if( setjmp( png_jmpbuf( read->pPng ) ) )
|
||||
@ -717,6 +726,13 @@ write_new( VipsImage *in )
|
||||
user_error_function, user_warning_function )) )
|
||||
return( NULL );
|
||||
|
||||
#ifdef PNG_SKIP_sRGB_CHECK_PROFILE
|
||||
/* Prevent libpng (>=1.6.11) verifying sRGB profiles.
|
||||
*/
|
||||
png_set_option( write->pPng,
|
||||
PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON );
|
||||
#endif /*PNG_SKIP_sRGB_CHECK_PROFILE*/
|
||||
|
||||
/* Catch PNG errors from png_create_info_struct().
|
||||
*/
|
||||
if( setjmp( png_jmpbuf( write->pPng ) ) )
|
||||
|
Loading…
Reference in New Issue
Block a user