Jump to content

64-bit BMPs


Recommended Posts

I was able to create 64bppArgb Bitmaps and to save them as BMPs with a bitcount of 64-bit.

It looks like there is gdi+ support nowadays.

paint.net is able to load these BMPs. Colors and alpha looked ok

I was wondering about the values in these 16-bit channels. The range is from 0 to 0x2000.  

(BGRA) (0x2000 0x2000 0x2000 0x2000) seems to be white full opaque.

Does anybody know if these values are a 16-bit floating point variant and which one?





midoras signature.gif

Link to comment
Share on other sites

I found the following in the wic documents

Fixed-Point Numerical Encoding

16-bit fixed-point values are interpreted as s2.13: sign bit, two integer bits, and thirteen fractional bits. Using this interpretation, a numerical range of −4.0 to +3.999... can be represented, with the value of 1.0 represented by the signed integer value 8192 (0x2000).


and implemented


        int Fixed16To16bits(int fixed16)
            double d = (double)fixed16 / 0x2000; // 2^13 = 8192 = 0x2000; d is now in the range 0..1
            return (int)(d * 0xFFFF); // 2^16-1 = 65535 = 0xFFFF


to convert the fixed point to a standard channel value.


This works so far, but the image in the pdf is a little bit dark. Not sure where to look for this issue in the moment.

I'm getting a better results by using bitmap.GetPixel() and stretching the 8 bit channel values to 16bit.



midoras signature.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...