Page 1 of 1

converting bmp to grayscale png

Posted: 2019-02-18T07:21:17-07:00
by manit
hi,
Here is my problem :-
$ convert -set colorspace Gray ./66/SIRE-66_6_2_HT4.bmp 66_SIRE-66_6_2_HT4.png
convert: length and filesize do not match `./66/SIRE-66_6_2_HT4.bmp' @ warning/bmp.c/ReadBMPImage/831.
$ file ./66/SIRE-66_6_2_HT4.bmp
./66/SIRE-66_6_2_HT4.bmp: PC bitmap, Windows 3.x format, 712 x 540 x 8
Input BMP File is at https://ufile.io/d1p9y

Thanks.

Re: converting bmp to grayscale png

Posted: 2019-02-18T08:35:00-07:00
by snibgo
The metadata in your BMP says the image takes zero bytes in the file. This is clearly wrong, and IM warns you about this. But it is just a warning, and the result should be okay.

Re: converting bmp to grayscale png

Posted: 2019-02-18T09:48:32-07:00
by magick
We inspected the image. It claims a file size of 1078 bytes whereas its actually 385558 and results in a warning exception.

Re: converting bmp to grayscale png

Posted: 2019-02-20T05:02:42-07:00
by manit
snibgo ,
you are right .
I saw error but command still works .

magick,
Can you tell how you found 1078 claim ?

Thanks.