Merge pull request #151 from lovell/libpng-skip-profile-check
Prevent libpng verifying sRGB profiles
This commit is contained in:
commit
858b6ca2db
@ -188,6 +188,12 @@ 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 +723,12 @@ 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