foreground

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
red911
Posts: 3
Joined: 2012-04-18T15:33:04-07:00
Authentication code: 13

foreground

Post by red911 »

I'm using convert v6.0.7 and this simple command-line command fails:
"convert -foreground green input.png output.png" with this error:
"convert: unrecognized option `-foreground'.

The exact version information is
Version: ImageMagick 6.0.7 05/28/10 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2004 ImageMagick Studio LLC


Has the -foreground flag been deprecated? Is there a new syntax or terminology?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: foreground

Post by fmw42 »

red911 wrote:I'm using convert v6.0.7 and this simple command-line command fails:
"convert -foreground green input.png output.png" with this error:
"convert: unrecognized option `-foreground'.

The exact version information is
Version: ImageMagick 6.0.7 05/28/10 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2004 ImageMagick Studio LLC


Has the -foreground flag been deprecated? Is there a new syntax or terminology?

It has not been deprecated to my knowledge. See http://www.imagemagick.org/script/comma ... foreground

However, I am getting the same error message in IM 6.7.6.6 Q16 Mac OSX Snow Leopard when I try

convert logo: -foreground green logo_tmp.png

However, I have not use -foreground before. It is a setting and will not by itself change the image.


What is it exactly that you are trying to achieve?
red911
Posts: 3
Joined: 2012-04-18T15:33:04-07:00
Authentication code: 13

Re: foreground

Post by red911 »

I'm trying to control the color of text labels in an image.

I just discovered by trial and error (for lack of good documentation), that -fill green does the trick.

Thanks for the reply.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: foreground

Post by fmw42 »

red911 wrote:I'm trying to control the color of text labels in an image.

I just discovered by trial and error (for lack of good documentation), that -fill green does the trick.

Thanks for the reply.
Yes, -fill is what is supposed to be used when using -draw to make text. Other text functions such as label: and caption: use -background.
Last edited by fmw42 on 2012-04-18T19:54:05-07:00, edited 1 time in total.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: foreground

Post by anthony »

-foreground is a "display" option only!

As in the foreground color of X window menus!

Damn these limited option explainations!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: foreground

Post by fmw42 »

anthony wrote:-foreground is a "display" option only!

As in the foreground color of X window menus!

Damn these limited option explainations!
Yes it would have helped if there was a [Display] on the right side of the options definition.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: foreground

Post by anthony »

DONE (both IMv6 and IMv7 option files) -- give it a bit of time to update
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
red911
Posts: 3
Joined: 2012-04-18T15:33:04-07:00
Authentication code: 13

Re: foreground

Post by red911 »

Thanks guys,

Oddly, the current online documentation for -draw refers to -fill as examples for the sytax to set the color. It ought also say BTW "Use -fill to set the color". Job done.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: foreground

Post by anthony »

Exactly where?

Note if you want to 'fill with a tile' you can do that too! but not all operators understand this.
-annotate does as does -draw
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply