remove warnings from profile compat check
since they can be triggered under normal circs. now when you thumbnail a CMYK image
This commit is contained in:
parent
c5d0ca8300
commit
9c73539258
@ -38,6 +38,9 @@
|
||||
* - more input profile sanity tests
|
||||
* 8/3/18
|
||||
* - attach fallback profile on import if we used it
|
||||
* 28/12/18
|
||||
* - remove warning messages from vips_icc_is_compatible_profile() since
|
||||
* they can be triggered under normal circumstances
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1250,7 +1253,7 @@ vips_icc_ac2rc( VipsImage *in, VipsImage **out, const char *profile_filename )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* TRUE if a profile is compatible with an image.
|
||||
/* TRUE if a profile is sane and is compatible with an image.
|
||||
*/
|
||||
gboolean
|
||||
vips_icc_is_compatible_profile( VipsImage *image,
|
||||
@ -1258,22 +1261,19 @@ vips_icc_is_compatible_profile( VipsImage *image,
|
||||
{
|
||||
cmsHPROFILE profile;
|
||||
|
||||
if( !(profile = cmsOpenProfileFromMem( data, data_length )) ) {
|
||||
g_warning( "%s", _( "corrupt profile" ) );
|
||||
if( !(profile = cmsOpenProfileFromMem( data, data_length )) )
|
||||
/* Corrupt profile.
|
||||
*/
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if( vips_image_expected_bands( image ) !=
|
||||
vips_icc_profile_needs_bands( profile ) ) {
|
||||
VIPS_FREEF( cmsCloseProfile, profile );
|
||||
g_warning( "%s",
|
||||
_( "profile incompatible with image" ) );
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if( vips_image_expected_sig( image ) != cmsGetColorSpace( profile ) ) {
|
||||
VIPS_FREEF( cmsCloseProfile, profile );
|
||||
g_warning( "%s",
|
||||
_( "profile colourspace differs from image" ) );
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
|
@ -1515,7 +1515,7 @@ vips__foreign_convert_saveable( VipsImage *in, VipsImage **ready,
|
||||
/* Some format libraries, like libpng, will throw a hard error if the
|
||||
* profile is inappropriate for this image type. With profiles inherited
|
||||
* from a source image, this can happen all the time, so we
|
||||
* want to just drop the profile in this case.
|
||||
* want to silently drop the profile in this case.
|
||||
*/
|
||||
if( vips_image_get_typeof( in, VIPS_META_ICC_NAME ) ) {
|
||||
void *data;
|
||||
|
Loading…
Reference in New Issue
Block a user