Menu

#12 Method Surface.Bitmap doesn't add palette size when image ha

open
nobody
None
5
2011-03-29
2010-11-06
No

Method Surface.Bitmap doesn't add palette size when image has 1 byte per pixel.

Code:

Code:

byte[] arr = new byte[(this.Width * this.Height * this.BytesPerPixel) + this.BmpHeader];

Should be something like:

Code:

byte[] arr = new byte[(this.Width * this.Height * this.BytesPerPixel) + this.BmpHeader + (this.BytesPerPixel == 1)? 1024 : 0];

1024 = 256 palette colours X 4 bytes.

Discussion

  • Stefan Ekman

    Stefan Ekman - 2011-03-29
    • status: open --> wont-fix
     
  • Stefan Ekman

    Stefan Ekman - 2011-03-29
    • status: wont-fix --> open
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.