locked
Reading bitmaps....24Bit is skewed and decolored

    Question

  • http://www.hotlinkfiles.com/files/1479600_cgzn9/OpenBitmap.exe

     

    There is my exe file so you can test it for yourself.  32Bit bitmaps work fine, my code for 32 bit reads 4 bytes per pixel at a type starting from the image and sets the pixels of a bitmap and then loads that to a pictureBox.  For 24 bit, it reads 3 bytes per pixel and sets the pixels.  BUT, for the 24 bit the color is mainly grayish, but if you look close you can see some green/red/blue looking lines going across the image.  And it is also skewed like 30-50 degrees.  I think this is because of the padding of bytes at the end of lines, but I don't know how to calculate the amount of padding bytes there are going to be...

     

    Thanks,

    paoloTheCool

    Saturday, June 21, 2008 3:26 AM

Answers

All replies