Reputation: 1
I'm using CImg and I have noticed that I cant write TIFF images with float data. CImg wrotes them as 1byte/per pixel integer images.
¿Does anyone know if it is possible to write float images? Or, do you know other lib to do it.
Upvotes: 0
Views: 2788
Reputation: 31
CImg has probably one of the best tiff support of all image processing libraires out there, and is perfect to read/write float-valued multi-spectral images. But, you have to link your code with the libtiff library to allow it, by defining the macro 'cimg_use_tiff' as a compilation variable :
#define cimg_use_tiff
#include "CImg.h"
..
CImg<float> img(..);
img.save_tiff("file_float.tiff");
Upvotes: 3