Re: [CinePaint] Color Selection
Frank Peters <[email protected]>
| Newsgroups | gmane.comp.video.cinepaint.user |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 4 Aug 2006 13:09:06 +0900 <[email protected]> wrote: > > I'd like to pick a color from "Color Selection" panel. > But, It was not floating point value. > Is this working for 8 bit interger value only ? > That, in my opinion, is an interesting question. The human eye would have great difficulty in discriminating more that 256^3 = 16777216 different colors and so a color selection dialog based on 8-bit values should be sufficient. However, strictly speaking, the selected 8-bit color value should then be mapped into the appropriate range for the image. For example, is the color is 0x80, 0x80, 0x80 (hexadecimal) and the image is 16-bit integer, the stored values should be 0x8000, 0x8000, 0x8000. If the image is IEEE 32-bit float, the stored values should be 0.5, 0.5, 0.5 (because 0x80 represents half of the maximum range). But with Cinepaint this is not what happens. If a user selects 0x80, 0x80, 0x80 as the color, both high- and low-order bytes are set to 0x80: 0x8080, 0x8080, 0x8080, and with IEEE 32-bit float this becomes 0.501961, 0.501961, 0.501961. This represents a value that is greater than half of the maximum range. Now, although, in a strict sense, this anomaly would be completely unnoticed by the human eye, it is still incorrect. I don't know if this behavior is acceptable among image programmers or not, but the 8-bit value selected by the user should be accurately mapped into the appropriate range for the image. This behavior can be seen by creating a new 16-bit image and then filling it with a selected 8-bit color. Select the Window info (View --> Window info) and place the cursor within the image. The indicated values will show an inaccurate mapping. Frank Peters ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV