I create an ImageBuf and then try to save the image to a file:
ImageBuf* histogram_R = ip_histogram_to_image (r, xres, yres);
histogram_R->save (path_R);
The result is an image, which is not what it should be. It is
transparent, and it has some pixels here and there.
I call my function from command line with argument -o output_filename
so what is left on stack will be saved. To check if histogram_R is ok
I did the following, which gave the proper result.
ImageSpec specR (256, 256, 1, TypeDesc::FLOAT);
ot.push (new ImageRec ("irec", specR, ot.imagecache));
ImageBuf &Rib ((*ot.curimg)());
Rib = *histogram_R;
Probably I am using "save" the wrong way?
Thanks
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org