I've been playing around a bit with the exr libraries and tried creating an exr file with a data window < display window (the area with data is smaller than the image resolution). Using the sample code provided in the docs to read the image and saving it with:
Code: Select all
void writeRgba2 (const char fileName[], const Rgba *pixels, int width, int height, const Box2i &dataWindow) {
Box2i displayWindow (V2i (0, 0), V2i (width - 1, height - 1));
RgbaOutputFile file (fileName, displayWindow, dataWindow, WRITE_RGBA);
file.setFrameBuffer (pixels, 1, width);
file.writePixels (dataWindow.max.y - dataWindow.min.y + 1);
}
Original image
Generated image
But imagemagick stretches the end of the data window until the end of the image:
The problem persists after converting the image to other formats (eg. convert test.exr test.png).