MagickExportImagePixels & 16 bits 1555

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
68882

MagickExportImagePixels & 16 bits 1555

Post 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);
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: MagickExportImagePixels & 16 bits 1555

Post 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
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Post Reply