This project has moved. For the latest updates, please go here.

Saving image as RGB565 format BMP

Jan 4 at 1:44 PM
Hi,

I am opening a very basic png (but could be a bmp, jpg), adding a line of text via Magick.NET, and then need to save the image in RGB565 format BMP.

I am doing this in C#, but I am not sure how to actually save a BMP in RGB565 using Magick.NET. Can anyone provide an example or information?

THANK YOU!
Chris
Coordinator
Jan 5 at 9:05 AM
There is currently no support for writing BMP images in the RGB565 format. I created an issue to add support for this here: https://github.com/ImageMagick/ImageMagick/issues/344. I will probably take a look at this next week to see if I can add this.
Jan 5 at 9:59 PM
Alright, thank you.
Coordinator
Jan 14 at 5:46 PM
Edited Jan 15 at 8:56 AM
I just added this feature and you will be able to use it in the next release of Magick.NET that I will publish tomorrow.
using (MagickImage image = new MagickImage("input.bmp"))
{
  image.Write("output.bmp", new BmpWriteDefines()
  {
    Subtype = BmpSubtype.RGB565,
  });
}