diff --git a/TODO b/TODO index 960c81d6..5589dc13 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,5 @@ -- im_rad2vips should be radiance.c? same for im_mat2vips? new naming - convention - - move im_shrink & friends to resample? match_linear, match_linear_search? diff --git a/libsrc/format/Makefile.am b/libsrc/format/Makefile.am index dc01f7f2..88f46218 100644 --- a/libsrc/format/Makefile.am +++ b/libsrc/format/Makefile.am @@ -9,10 +9,8 @@ libformat_la_SOURCES = \ im_exr2vips.c \ im_jpeg2vips.c \ im_magick2vips.c \ - im_mat2vips.c \ im_png2vips.c \ im_ppm2vips.c \ - im_rad2vips.c \ im_raw2vips.c \ im_tiff2vips.c \ im_tile_cache.c \ @@ -21,6 +19,8 @@ libformat_la_SOURCES = \ im_vips2png.c \ im_vips2ppm.c \ im_vips2tiff.c \ - im_vips2raw.c + im_vips2raw.c \ + matlab.c \ + radiance.c INCLUDES = -I${top_srcdir}/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ diff --git a/libsrc/format/im_mat2vips.c b/libsrc/format/matlab.c similarity index 100% rename from libsrc/format/im_mat2vips.c rename to libsrc/format/matlab.c diff --git a/libsrc/format/im_rad2vips.c b/libsrc/format/radiance.c similarity index 98% rename from libsrc/format/im_rad2vips.c rename to libsrc/format/radiance.c index f9c2d2fa..722b74c8 100644 --- a/libsrc/format/im_rad2vips.c +++ b/libsrc/format/radiance.c @@ -27,6 +27,22 @@ */ +/* + + Remaining issues: + ++ the whole image is unpacked to a 3-band float and so will (potentially) + need a fair bit of memory + + we could just read RGBE/XYZE and leave it at 4 bytes per pixel, then + unpack on the fly with an operator along the lines of LabQ2Lab + ++ it ignores some header fields, like VIEW and DATE + ++ it will not rotate/flip as the FORMAT string asks + + */ + /* Sections of this reader from Greg Ward and Radiance with kind @@ -936,8 +952,7 @@ rad2vips_get_data( Read *read, FILE *fin, IMAGE *im ) for( y = 0; y < im->Ysize; y++ ) { if( freadscan( read->buf, im->Xsize, fin ) ) { - im_error( "rad2vips", "%s", - _( "read error" ) ); + im_error( "rad2vips", "%s", _( "read error" ) ); return( -1 ); } if( im_writeline( y, im, (void *) read->buf ) )