Page 1 of 1

Remove ASCII BGRs from BMP

Posted: 2015-12-22T07:42:32-07:00
by Stefano
Hi,

my name is Stefano, and I'm a member of IT staff in a multisite company.
I have to insert QR Codes in our Crystal Report 6 (used for internally develop applications) that can accept ONLY BMP.
I have created qr in png, and then converted them using ImageMagick convert.exe into bmp, but CR6 cannot recognize them correctly.

I guess I found the issue: opening the converted bmp with notepad, I see the initial string with BGRs entry (I guess color profile).
I've tried to open that bmp with MS Paint and then simply saved it again: the resulting saved bmp does NOT have that ASCII BGRs value, and CR6 can read it properly!!!

I wish to use convert to automatically do the above: I've tried -strip / +profile options, but with no result.
Could you please let me know how I can achieve my goal?

Thank you in advance

Re: Remove ASCII BGRs from BMP

Posted: 2015-12-22T07:56:31-07:00
by Stefano
Additional info:

i've also tried BMP2: option... It removed the BGRs header, but it lets CR6 crash (differently from the saved bmp from Paint...)!

Re: Remove ASCII BGRs from BMP

Posted: 2015-12-22T08:04:48-07:00
by GeeMack
Stefano wrote:Could you please let me know how I can achieve my goal?
IM should be able to convert your PNG to a few slightly different BMP formats. I'm using IM7 which can convert to BMP, BMP2, and BMP3. When I save a BMP with MS Paint and check it with IM's "identify"...

Code: Select all

identify qrcode.bmp
...it shows as a BMP3. You might try forcing IM to use BMP3 using a command something like this...

Code: Select all

convert qrcode.png -define bmp:format=bmp3 qrcode.bmp

Re: Remove ASCII BGRs from BMP

Posted: 2015-12-22T08:32:41-07:00
by Stefano
You might try forcing IM to use BMP3 using a command something like this...

CODE: SELECT ALL
convert qrcode.png -define bmp:format=bmp3 qrcode.bmp
Great! It works! Thank you very much for your support!

Re: Remove ASCII BGRs from BMP

Posted: 2015-12-22T10:47:21-07:00
by fmw42
You can also do it this way:

Code: Select all

convert qrcode.png BMP3:qrcode.bmp