Remapping an image to a palette, leaving the palette indexes unchanged
Jon Perkin <[email protected]>
| Newsgroups | gmane.comp.video.image-magick.user |
|---|---|
| Message-ID | <6BAD84D0221CC74980B3751933E56BCC43C0537D76@IE2RD2XVS021.red002.local> |
Hi folks.
I need to produce uncompressed 8-bit palettized Windows-style BMP images for an embedded platform, using a fixed palette in a fixed order (because the platform will ignore the palette and apply its own to the BMP files indexes), ideally using PerlMagick. I'd ideally be able to control whether this remapping is done with (Floyd-Steinberg) dithering or not.
I've been experimenting with generating a base image using ->Set('colormap[n]'=>...) and then compositing the image in, but I can't get it to deliver an image with the palette I want let alone the palette entries at the right indexes.
I also tried using ->Remap(...), but it seems not to be implemented either on my Windows machines (installed from downloaded binaries) or my Linux machines (installed from source).
My ImageMagick versions vary from 6.3.7 to 6.4.0 but all seem to behave the same.
Anyone have any idea how to achieve this?
Cheers, Jon.