Page 1 of 1

Behaviour of -define bmp:subtype=RGB565

Posted: 2019-08-17T00:19:10-07:00
by Dus
Apologies if this is just pebkac or if it's known already but I could not find info specific to this possible bug.

Using ImageMagick-7.0.8-60-portable-Q16-x86.zip on win7 I find the command

convert tst.bmp -define bmp:subtype=RGB565 rslt.bmp

gives a shift of 6 pixels to the left in rslt.bmp. The six columns that fell off now fill the right of the image. With some anomalies at the right top.
I think you can reproduce this with any old bmp made in mspaint.

Re: Behaviour of -define bmp:subtype=RGB565

Posted: 2019-08-17T07:51:31-07:00
by snibgo
Please paste links to the input and output image files.

Re: Behaviour of -define bmp:subtype=RGB565

Posted: 2019-08-17T08:30:58-07:00
by Dus

Re: Behaviour of -define bmp:subtype=RGB565

Posted: 2019-08-17T10:10:08-07:00
by snibgo
Using Windows Photo Viewer, those images (rslt.bmp and 200x26.bmp) look identical.

Re: Behaviour of -define bmp:subtype=RGB565

Posted: 2019-08-17T10:33:25-07:00
by Dus
http://www.yourfilelink.com/get.php?fid=2117930

What I see is in the zip. rslt is the top image because of the specific top right corner.
I've done this on an XP machine as well, it's the same.

Which version introduced bmp:subtype=RGB565 ?

Re: Behaviour of -define bmp:subtype=RGB565

Posted: 2019-08-19T09:24:56-07:00
by Jason S
Your rslt.bmp file looks okay in the viewers and web browsers I tried, and is correct based on what I know about BMP format. But it is an uncommon type of BMP, not supported by everything.

I guess you are using a viewer that does not support the combination of a BMPv5 header (which ImageMagick calls "BMP4", because reasons) and a BI_BITFIELDS image type (which is required for RGB565).

Maybe your viewer does support BMPv3 with BI_BITFIELDS, but unfortunately I don't know any way to get ImageMagick (as of 7.0.8-61) to correctly write such an image. It will try, if you use "-define bmp:format=bmp3", but it does it wrong.

Re: Behaviour of -define bmp:subtype=RGB565

Posted: 2019-08-20T14:55:16-07:00
by Dus
It never occured to me to drag the bmp to Firefox in which it looks OK.
Now first I need to see how much I need this, thanks.