|
From: | Florian Kainz |
Subject: | Re: [Openexr-devel] channel configurations and types |
Date: | Thu, 14 Sep 2006 10:14:21 -0700 |
User-agent: | Mozilla Thunderbird 1.0 (X11/20041207) |
darby johnston wrote:
--- Florian Kainz <address@hidden> wrote:When you read an image file, the library will automatically convert from the data type in the file to the data type in the frame buffer. You can read a file with half data into a frame buffer of type float.Great! That makes things easy...When you write a file, the library will not convert between data types. The type in the file must match the type in the frame buffer.Out of curiosity, why do the conversion for reading but not for writing?
When you write an image, you know the data types in your frame buffer, and making the data types in the file match shouldn't be a problem. When you read an image, you have no control over the data types in the file. If the file doesn't contain what you expect, you'd either have to change the type of your frame buffer or convert the pixel data to match your frame buffer. Both alternatives are rather inconvenient. The library tries to be helpful by converting the data for you.
[Prev in Thread] | Current Thread | [Next in Thread] |