don't strip profiles in XYZ2scRGB
see https://github.com/lovell/sharp/issues/125
This commit is contained in:
parent
9a3fcc74c1
commit
4b51a9d61f
@ -3,6 +3,7 @@
|
|||||||
- better pbm (one bit) load, better pfm (float) load/save
|
- better pbm (one bit) load, better pfm (float) load/save
|
||||||
- added pbm (one bit) save
|
- added pbm (one bit) save
|
||||||
- changed vips_gaussblur() parameters, sorry
|
- changed vips_gaussblur() parameters, sorry
|
||||||
|
- fixed XYZ2scRGB profile handling, thanks Lovell
|
||||||
|
|
||||||
25/7/14 started 7.41.0
|
25/7/14 started 7.41.0
|
||||||
- start working on --disable-deprecated
|
- start working on --disable-deprecated
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
* - from Yxy2XYZ.c
|
* - from Yxy2XYZ.c
|
||||||
* 1/7/13
|
* 1/7/13
|
||||||
* - remove any ICC profile
|
* - remove any ICC profile
|
||||||
|
* 25/11/14
|
||||||
|
* - oh argh, revert the above
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -50,20 +52,21 @@ typedef VipsColourSpaceClass VipsXYZ2scRGBClass;
|
|||||||
|
|
||||||
G_DEFINE_TYPE( VipsXYZ2scRGB, vips_XYZ2scRGB, VIPS_TYPE_COLOUR_SPACE );
|
G_DEFINE_TYPE( VipsXYZ2scRGB, vips_XYZ2scRGB, VIPS_TYPE_COLOUR_SPACE );
|
||||||
|
|
||||||
static int
|
/* We used to have the comment:
|
||||||
vips_XYZ2scRGB_build( VipsObject *object )
|
|
||||||
{
|
|
||||||
if( VIPS_OBJECT_CLASS( vips_XYZ2scRGB_parent_class )->build( object ) )
|
|
||||||
return( -1 );
|
|
||||||
|
|
||||||
/* We've converted to sRGB without a profile. We must remove any ICC
|
* We've converted to sRGB without a profile. We must remove any ICC
|
||||||
* profile left over from import or there will be a mismatch between
|
* profile left over from import or there will be a mismatch between
|
||||||
* pixel values and the attached profile.
|
* pixel values and the attached profile.
|
||||||
*/
|
|
||||||
vips_image_remove( VIPS_COLOUR( object )->out, VIPS_META_ICC_NAME );
|
|
||||||
|
|
||||||
return( 0 );
|
But this isn't right, we often call things sRGB that we know are not true
|
||||||
}
|
sRGB, for example:
|
||||||
|
|
||||||
|
vips sharpen k2.jpg x.jpg
|
||||||
|
|
||||||
|
sharpen will treat k2 as being in sRGB space even if that image has a
|
||||||
|
profile. If we drop the profile, x.jpg is suddenly untagged.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
vips_XYZ2scRGB_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width )
|
vips_XYZ2scRGB_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width )
|
||||||
@ -100,7 +103,6 @@ vips_XYZ2scRGB_class_init( VipsXYZ2scRGBClass *class )
|
|||||||
|
|
||||||
object_class->nickname = "XYZ2scRGB";
|
object_class->nickname = "XYZ2scRGB";
|
||||||
object_class->description = _( "transform XYZ to scRGB" );
|
object_class->description = _( "transform XYZ to scRGB" );
|
||||||
object_class->build = vips_XYZ2scRGB_build;
|
|
||||||
|
|
||||||
colour_class->process_line = vips_XYZ2scRGB_line;
|
colour_class->process_line = vips_XYZ2scRGB_line;
|
||||||
}
|
}
|
||||||
@ -119,7 +121,7 @@ vips_XYZ2scRGB_init( VipsXYZ2scRGB *XYZ2scRGB )
|
|||||||
* @out: output image
|
* @out: output image
|
||||||
* @...: %NULL-terminated list of optional named arguments
|
* @...: %NULL-terminated list of optional named arguments
|
||||||
*
|
*
|
||||||
* Turn XYZ to Yxy.
|
* Turn XYZ to scRGB.
|
||||||
*
|
*
|
||||||
* Returns: 0 on success, -1 on error
|
* Returns: 0 on success, -1 on error
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user