convert "-append" color problem

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
kfeina
Posts: 17
Joined: 2013-02-12T13:09:49-07:00
Authentication code: 6789

convert "-append" color problem

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert "-append" color problem

Post 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.
snibgo's IM pages: im.snibgo.com
kfeina
Posts: 17
Joined: 2013-02-12T13:09:49-07:00
Authentication code: 6789

Re: convert "-append" color problem

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert "-append" color problem

Post 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)".
snibgo's IM pages: im.snibgo.com
kfeina
Posts: 17
Joined: 2013-02-12T13:09:49-07:00
Authentication code: 6789

Re: convert "-append" color problem

Post 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.
Post Reply