#include #define WIDTH 256 #define HEIGHT 300 ImfRgba pixels[WIDTH * HEIGHT]; int main(int argc, char **argv) { int i; int width = WIDTH; int height = HEIGHT; float r = 1.0; float g = 2.0; float b = 2.4; float a = 7.8; ImfHeader *header = NULL; ImfOutputFile *fp = NULL; for (i = 0; i < WIDTH * HEIGHT; i++) { ImfFloatToHalf(r, &pixels[i].r); ImfFloatToHalf(g, &pixels[i].g); ImfFloatToHalf(b, &pixels[i].b); ImfFloatToHalf(a, &pixels[i].a); } header = ImfNewHeader(); ImfHeaderSetDisplayWindow(header, 0, 0, width, height); ImfHeaderSetDataWindow(header, 0, 0, width, height); ImfHeaderSetScreenWindowWidth(header, width); fp = ImfOpenOutputFile("test.exr", header, IMF_WRITE_RGBA); ImfOutputSetFrameBuffer(fp, pixels, /* pointer to pixels */ 1, /* xstride */ width); /* ystride */ ImfOutputWritePixels(fp, height); /* scanlines */ ImfCloseOutputFile(fp); ImfDeleteHeader(header); }

Software error:

Permission denied at plugin/attach/AttachHandler.pm line 172.

For help, please send mail to the webmaster (webmaster@sourceforge.net), giving this error message and the time and date of the error.