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

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
pchalats
Posts: 1
Joined: 2019-01-16T05:11:32-07:00
Authentication code: 1152

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

Post by pchalats » 2019-01-16T05:16:15-07:00

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

User avatar
fmw42
Posts: 24470
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2019-01-16T11:26:42-07:00

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

Post Reply