Page 1 of 1

Creating a png image and converting it to bmp3 (v6)

Posted: 2019-01-16T05:16:15-07:00
by pchalats
Hi,

I am trying to create a png from command line and then convert it to BMP3 format:

Code: Select all

convert -size 172x172 xc:white \
			-type Optimize -compress none \
			-flatten \
			-gravity North \
			-font "Helvetica" \
			-pointsize 20 \
			-annotate +0+15 "aaaaa" \
			-font "Helvetica" \
			-gravity Center \
			-pointsize 70 \
			-annotate +0+0 "bbbbb" \
			-gravity South \
			-font "Helvetica" \
			-pointsize 20 \
			-annotate +0+30 "cccc" \
			-pointsize 17 \
			-annotate +0+17 "dddd.dd" \
			-pointsize 15 \
			-annotate +0+0 "eeee.ee" \
			-mattecolor black \
			-frame 10x10+0+0 \
file.png
Afterwards, I use convert again to change it to bmp3:

Code: Select all

convert file.png +repage -type Bilevel -colors 2 -compress none BMP3:test.bmp
My problem is that while png is a whte image with black letters, I get the BMP3 is negated, which produces a black image with white letters.
I tried using -negate to get the correct image but it doesn't work. Any help?

Regards,
Panos

Re: Creating a png image and converting it to bmp3 (v6)

Posted: 2019-01-16T11:26:42-07:00
by fmw42
This works fine for me on IM 6.9.10.23 Q16 Mac OSX Sierra:

Code: Select all

convert -size 172x172 xc:white \
-type Optimize -compress none \
-flatten \
-gravity North \
-font "Helvetica" \
-pointsize 20 \
-annotate +0+15 "aaaaa" \
-font "Helvetica" \
-gravity Center \
-pointsize 70 \
-annotate +0+0 "bbbbb" \
-gravity South \
-font "Helvetica" \
-pointsize 20 \
-annotate +0+30 "cccc" \
-pointsize 17 \
-annotate +0+17 "dddd.dd" \
-pointsize 15 \
-annotate +0+0 "eeee.ee" \
-mattecolor black \
-frame 10x10+0+0 \
file.png
convert file.png BMP3:file.bmp

_____________________________

Please, always provide your IM version and platform when asking questions, since syntax may differ.


See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620

If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli


For novices, see

viewtopic.php?f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli