|
From: | Paul Miller |
Subject: | Re: [Openexr-devel] newbie questions: alpha-only files and linear conversion on save |
Date: | Thu, 20 Jan 2005 15:09:28 -0600 |
1) Using the RGBA-only interface, one way to write an alpha-only image is to open the file like this: RgbaOutputFile file (fileName, width, height, WRITE_A);
Make take on this is I still need to feed it an complete RGBA frame buffer, and it only saves the alpha channel. So for maximum performance I would prefer the manual header channel insert, since I would only need to "convert" my alpha components.
OpenEXR expects pixel data to be linear. In order to convert 8-bit pixels to OpenEXR's "half" you should linearize the data:
Ahh - this clears that up a good deal, thanks.
Note that this may apply only to RGB data. In many file formats alpha is linear. The opacity represented by the alpha channel is proportional to the 8-bit value stored in the pixel.
Yes, I am currently just converting my alpha components to half by dividing by 255 (or 65535).
On load, I am currently using the conversion code found in the exrdisplay tool.
Thanks for the help guys!
[Prev in Thread] | Current Thread | [Next in Thread] |