This is a very basic code sample that produces the behaviour:
Code: Select all
#include <Magick++.h>
#include <vector>
int main(void)
{
// fake image for testing. Equivalent to my data - float array with known width/height
unsigned w,h;
w = 240;
h = 240;
std::vector<float> i;
i.assign( 240*240, 0.5 );
// float array directly into magick image
Magick::Image mimg(w, h, "I", Magick::FloatPixel, &i[0]); // 'I' for single channel intensity data, right?
mimg.type( Magick::GrayscaleType ); // didn't seem to help at all.
mimg.write("test.exr");
}
person@machine:~/src$ identify test.exr
test.exr EXR 240x240 240x240+0+0 16-bit RGB 350KB 0.000u 0:00.000