Page 1 of 1

convert "-append" color problem

Posted: 2013-09-03T05:42:28-07:00
by kfeina
Hello,

I'm having problems when "converting" two png files with the append command.

My command is:
/usr/bin/convert /tmp/BGINFO4X/k/bgheader.png /tmp/BGINFO4X/k/bgalarm.png -background none -append "/tmp/BGINFO4X/k/bginfo4x.png"

My bgalarm.png has always red text (-fill red).
Image

The command used to generate the png file is:
/bin/cat "/tmp/BGINFO4X/k/bgalarm.out" | "/usr/bin/convert" -pointsize 10 -font Verdana-Italic -background none -density 120 -fill red label:@- "/tmp/BGINFO4X/k/bgalarm.png"

If bgheader.png has a colored text (-fill blue),
Image

The generated resulting bginfo4x.png is ok.
Image

The command used to generate the png file is:
/bin/cat "CUSTOM/CLIENT/LINUX/HEADER.CONF" | "/usr/bin/convert" -pointsize 20 -font Verdana-Italic -background none -density 120 -fill blue label:@- "/tmp/BGINFO4X/k/bgheader.png"

BUT if bgheader.png has a black text(-fill black),
Image

The resulting bginfo4x.png is not ok: the red text from the bgalarm.png is "overwritted" to gray.
Image

The command used to generate the png file is:
/bin/cat "CUSTOM/CLIENT/LINUX/HEADER.CONF" | "/usr/bin/convert" -pointsize 20 -font Verdana-Italic -background none -density 120 -fill black label:@- "/tmp/BGINFO4X/k/bgheader.png"

Can you help me? Thanks a lot.

Re: convert "-append" color problem

Posted: 2013-09-03T06:10:57-07:00
by snibgo
I can't see a problem with your commands.

What version of ImageMagick? What platform?

You can upload images to a site such as Dropbox.com, and post the URLs here. EDIT: My post cross-posted with your edit.

Re: convert "-append" color problem

Posted: 2013-09-03T06:26:24-07:00
by kfeina
Hello,

I use the following version on my ubuntu 13.04 (32 bits) machine:

Version: ImageMagick 6.7.7-10 2013-02-25 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

I uploaded the files via imgur.com.

Thanks a lot.

Re: convert "-append" color problem

Posted: 2013-09-03T07:33:34-07:00
by snibgo
That is an old version. I have v6.6.2, but can't reproduce the problem.

When the header text is black, every pixel in that image is black, with different alphas. This might cause a problem in your version of IM. An upgrade might cure the problem. Or choose a colour that isn't quite black for the text fill, eg "rgb(1,0,0)".

Re: convert "-append" color problem

Posted: 2013-09-03T08:36:11-07:00
by kfeina
Hello,

Yes, it is a bug of the version. On windows it doesn't hapen.

But in fact can be easily solved with your recommendation: -fill "rgb(1,0,0)"

Thanks a lot.