From c27df48fd7d10a4a51ea65ca9de1e40c368458f2 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 2 Apr 2008 18:19:35 +0000 Subject: [PATCH] stuff --- TODO | 24 ++++++++++++++++++++++++ libsrc/colour/im_XYZ2disp.c | 2 +- libsrc/colour/im_disp2XYZ.c | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index 10002f9a..5244731b 100644 --- a/TODO +++ b/TODO @@ -17,6 +17,30 @@ WONTFIX yuk, can we add a 16bit path to vips's lab <--> rgb converter? + use TIFF RGB16 as the 16bit RGB target + + im_XYZ2disp() would be easy to 16bit ... just need the 1,500 element table + table->t_Yr2r[i] expanded + + im_disp2XYZ() uses im_col_rgb2XYZ() in a loop ... again, need + the 1,500 element table table->t_r2Yr[i] expanded + + usually these three tables (t_r2Yr, t_g2Yg, t_b2Yb) will be identical, can + we common them up? same for t_Yr2r etc. + + how big should the table be for 16 bits? 256 times larger? too big! + + we really just need a LUUT for pow() with the right exponent, eg. 2.4 for + sRGBs, and one for 1/2.4 ... see what calcul_tables does: + + table->t_r2Yr[i] = yo + a * pow( i * table->ristep / f + c, ga ); + + see + + + + + - test maxpos_avg, quite a few changes - HAVE_HYPOT could define a hypot() macro? diff --git a/libsrc/colour/im_XYZ2disp.c b/libsrc/colour/im_XYZ2disp.c index 24477b3d..fc254acf 100644 --- a/libsrc/colour/im_XYZ2disp.c +++ b/libsrc/colour/im_XYZ2disp.c @@ -139,7 +139,7 @@ im_XYZ2disp( IMAGE *in, IMAGE *out, struct im_col_display *d ) */ if( in->Bands != 3 || in->BandFmt != IM_BANDFMT_FLOAT || in->Coding != IM_CODING_NONE ) { - im_errormsg( "im_XYZ2disp: 3-band uncoded float only" ); + im_error( "im_XYZ2disp", _( "3-band uncoded float only" ) ); return( -1 ); } diff --git a/libsrc/colour/im_disp2XYZ.c b/libsrc/colour/im_disp2XYZ.c index 233a72f9..dceb02f3 100644 --- a/libsrc/colour/im_disp2XYZ.c +++ b/libsrc/colour/im_disp2XYZ.c @@ -89,7 +89,7 @@ im_disp2XYZ( IMAGE *in, IMAGE *out, struct im_col_display *d ) */ if( in->Bands != 3 || in->BandFmt != IM_BANDFMT_UCHAR || in->Coding != IM_CODING_NONE ) { - im_errormsg( "im_disp2XYZ: input not 3-band uncoded char" ); + im_error( "im_disp2XYZ", _( "input not 3-band uncoded char" ) ); return( -1 ); }