Convert: weird DIB -> editable -> DIB again

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
tpublic

Convert: weird DIB -> editable -> DIB again

Post by tpublic »

I own one of the many Realtek 1073-based media player appliances (Patriot Box Office, Asus O!Play, Iomega ScreenPlan, Xstreamer, etc) and the internal GUI backgrounds & menus are an odd bit of 16bpp DIB BMP I think. I'd like to change them and put them back in to "skin" the device with customizations, however I'm having a hard time writing to them.

Presently, ImageMagick and MS Paint (XP) seems to read most of them, but not much else will. If I convert .bmp to .png, sometimes the png comes up with a funky palette, but further conversion from png to jpg clears that up. Converting .bmp/dib straight to jpg rarely works. No real errors, just wrong looking colors. Resolution seems fine no matter what. Actually, MS Paint tends to horizontally shift the original and wrap to the left about 10 pixels on some images, but IM always gets that right.

Inside each file, the header up to 0x32 seems fine to me (compression is BI_BITFIELDS) but I suppose I get lost at 0x36 where the Pallette Specification is zero. Perhaps this is normal, and there's nothing wrong with the header at all. Maybe the Bitmap Data Size at 0x22 isn't supposed to be zero, but reading the specs is my limit here.

When doing mass-conversions (~580 or so images, not all are important) I get complaints in pairs, but not for all files:
convert: Ignoring attempt to set negative chromaticity value
convert: Ignoring attempt to set cHRM RGB triangle with zero area

And, more rarely, I get the following gamma complaint:
convert: Limiting gamma to 21474.83

Now, ideally I would just like to be able to modify these images and then write them back out to the expected format (for what could be compared to an embedded platform, so there's not much wiggle room). I'm not sure what I would need to provide to help debug this, but I did see an old message from 2006 that indicated 16bpp DIBs weren't being written by IM. Is that still the case?
Post Reply