• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 758
  • Last Modified:

Changing the colour depth of a bitmap when saving

I need to change the colour depth (or PixelFormat) of a bitmap before I save it to a file. I'm guessing it's something to do with EncoderParams, but i'm not having much luck with them...

The bitmap starts off as: PixelFormat.Format32bppArgb

Thanks in advance
1 Solution
Create another bitmap with same size, and required pixel format. Then create Graphics object from destination bitmap using Graphics.FromImage method, and draw in it source bitmap using Graphics.DrawImage method. This copies source bitmap to destination. Save destination bitmap to file.
saltedAuthor Commented:
Thanks :)

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now