diff --git a/TODO b/TODO index 62c0b7e6..549c4828 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,5 @@ +- does radiance import give 0-1 RGB images? we could tag them as scRGB + - now we've removed round-to-nearest from NN, we need something extra in the affine transform to displace the input cods diff --git a/libvips/colour/rad2float.c b/libvips/colour/rad2float.c index 79cbe3bd..d34bf62d 100644 --- a/libvips/colour/rad2float.c +++ b/libvips/colour/rad2float.c @@ -1,10 +1,13 @@ /* Convert Radiance 32bit packed format to float. + * * 3/3/09 * - from LabQ2Lab and Radiance sources * 2/11/09 * - gtkdoc * 20/9/12 - * redo as a class + * - redo as a class + * 13/12/12 + * - tag output as scRGB, since it'll be 0-1 */ /* @@ -196,7 +199,7 @@ vips_rad2float_init( VipsRad2float *rad2float ) VipsColourCode *code = VIPS_COLOUR_CODE( rad2float ); colour->coding = VIPS_CODING_NONE; - colour->interpretation = VIPS_INTERPRETATION_sRGB; + colour->interpretation = VIPS_INTERPRETATION_scRGB; colour->format = VIPS_FORMAT_FLOAT; colour->bands = 3; diff --git a/libvips/foreign/radiance.c b/libvips/foreign/radiance.c index f829a223..a5221dde 100644 --- a/libvips/foreign/radiance.c +++ b/libvips/foreign/radiance.c @@ -6,6 +6,8 @@ * - add radiance write * 20/12/11 * - reworked as some fns ready for new-style classes + * 13/12/12 + * - tag RGB rad images as scRGB */ /* @@ -900,7 +902,7 @@ rad2vips_get_header( Read *read, FILE *fin, VipsImage *out ) vips_image_set_string( out, "rad-format", read->format ); if( strcmp( read->format, COLRFMT ) == 0 ) - out->Type = VIPS_INTERPRETATION_RGB; + out->Type = VIPS_INTERPRETATION_scRGB; else if( strcmp( read->format, CIEFMT ) == 0 ) out->Type = VIPS_INTERPRETATION_XYZ; else diff --git a/libvips/iofuncs/header.c b/libvips/iofuncs/header.c index ea9b93ec..400711b8 100644 --- a/libvips/iofuncs/header.c +++ b/libvips/iofuncs/header.c @@ -441,6 +441,7 @@ vips_image_guess_interpretation( const VipsImage *image ) case VIPS_INTERPRETATION_CMC: case VIPS_INTERPRETATION_LCH: case VIPS_INTERPRETATION_sRGB: + case VIPS_INTERPRETATION_scRGB: case VIPS_INTERPRETATION_YXY: if( image->Bands < 3 ) sane = FALSE;