Page 1 of 1

MagickExportImagePixels & 16 bits 1555

Posted: 2010-12-03T22:43:52-07:00
by 68882
Hi, I'm trying to convince ImageMagick to run MagickExportImagePixels yet instead of producing 32bits per pixel to product 16 bits in the form ARGB 1555

I had thought that doing this would do it, but it seems MagickExportImagePixels still wants to produce 32bits for each pixel.

const char *map = "ARGB";
MagickSetImageDepth(clone_wand,(size_t) 16);
status = MagickExportImagePixels(clone_wand,0,0,(size_t) w,(size_t) h,map,CharPixel,bitmapData);

Re: MagickExportImagePixels & 16 bits 1555

Posted: 2010-12-04T08:48:44-07:00
by el_supremo
Using CharPixel means 8 bits per colour and a map of ARGB means 4 colours per pixel so you get 32 bits per pixel.
As far as I know, there's no way to specify 16-bit 1555 output. You would have to process the 32-bit ARGB output yourself and convert it to 1555.

Pete