diff --git a/TODO b/TODO index 6dc0e224..af11e202 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,9 @@ +- try: -- try - - vips vips - - heh fix + vips colourspace 16bit.tif 8bit.tif sRGB + to convert a RGB16 image to a sRGB one ... you get RGB in 8bit.tif, but it's + still 16-bit - can we use postbuild elsewhere? look at use of "preclose" / "written", etc. diff --git a/libvips/colour/colourspace.c b/libvips/colour/colourspace.c index fbbba5a8..22172696 100644 --- a/libvips/colour/colourspace.c +++ b/libvips/colour/colourspace.c @@ -10,6 +10,8 @@ * - auto-decode RAD images * 3/2/14 * - add "source_space", overrides source space guess + * 8/5/14 + * - oops, don't treat RGB16 to sRGB */ /* @@ -366,14 +368,11 @@ vips_colourspace_issupported( const VipsImage *image ) VipsInterpretation interpretation; int i; - /* Treat RGB and RGB16 as sRGB. If you want some other treatment, + /* Treat RGB as sRGB. If you want some other treatment, * you'll need to use the icc funcs. - * - * sRGB2XYZ can handle 8 and 16-bit images. */ interpretation = vips_image_guess_interpretation( image ); - if( interpretation == VIPS_INTERPRETATION_RGB || - interpretation == VIPS_INTERPRETATION_RGB16 ) + if( interpretation == VIPS_INTERPRETATION_RGB ) interpretation = VIPS_INTERPRETATION_sRGB; for( i = 0; i < VIPS_NUMBER( vips_colour_routes ); i++ ) @@ -433,13 +432,10 @@ vips_colourspace_build( VipsObject *object ) else interpretation = vips_image_guess_interpretation( x ); - /* Treat RGB and RGB16 as sRGB. If you want some other treatment, + /* Treat RGB as sRGB. If you want some other treatment, * you'll need to use the icc funcs. - * - * sRGB2XYZ can handle 8 and 16-bit images. */ - if( interpretation == VIPS_INTERPRETATION_RGB || - interpretation == VIPS_INTERPRETATION_RGB16 ) + if( interpretation == VIPS_INTERPRETATION_RGB ) interpretation = VIPS_INTERPRETATION_sRGB; /* No conversion necessary.