openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] Writing a tiled Rgba image file with tiles given


From: Florian Kainz
Subject: Re: [Openexr-devel] Writing a tiled Rgba image file with tiles given
Date: Fri, 06 Mar 2009 11:34:30 -0800
User-agent: Mozilla Thunderbird 1.0 (X11/20041207)

Werner Benger wrote:

I had some problems with what I thought would be taken care of by
setting INCREASING_Y vs. DECREASING_Y in the header. I had expected
it to turn upside down an image, but neither exrdisplay, Photoshop
nor Irfanview did show a difference there. Instead, I'm setting up
the frame buffer with a call like this:

vector<Rgba> Pixels;
TiledRgbaOutputFile *Outfile;
    ...
    Outfile->setFrameBuffer(&*Pixels.begin()+
                tileXSize*tileYSize-1,
                1,                // xStride
                -tileXSize,        // yStride
                true                // the pixels buffer is relative
                );



So it begins with the last row and advances backwards to the first
row. Is this the right way to do it? How would it be different from
INCREASING_Y vs. DECREASING_Y ?


Werner,

the lineOrder flag (INCREASING_Y or DECREASING_Y) does not change
the pixel coordinate system.  The flag affects only the order in
which the pixels are stored in the file.

The flag allows file reading code to optimize I/O throughput: if
your code doesn't require random access to scan lines or tiles, then
it can avoid seek operations by reading the file front to back.
(The readPixels and readTiles functions do this automatically when you
read a large number of scan lines or tiles in a single function call.)

Florian





reply via email to

[Prev in Thread] Current Thread [Next in Thread]