Help With Text Coloring

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
dononyx
Posts: 5
Joined: 2018-01-06T10:01:31-07:00
Authentication code: 1152

Help With Text Coloring

Post by dononyx »

This used to work in IM 6.9
convert $f -font Arial -pointsize 80 -quiet -draw "gravity center rotate 45 fill #80808080 text 0,12 'Licensed to Property Insight by Cook County Recorder of Deeds'" $CUSTOMER_DIR/$THE_DATE/$(basename $f);
In IM 7 it splits the image in 2

I tried this in IM 7
convert $f -font Arial -pointsize 120 -fill "#080" -draw "gravity center rotate 45 text 0,12 'Licensed to Property Insight by Cook County Recorder of Deeds'" $CUSTOMER_DIR/$THE_DATE/$(basename $f);
but I cannot for the life of me figure out how to make the text gray again (it is light green). Multiple Combinations give either R, G, or B, or Gray.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help With Text Coloring

Post by fmw42 »

IM 7 uses magick not convert? Please post your full IM versions (for 6 and 7) and platform and your input image.

#80808080 is gray with alpha, but #080 is opaque green. So you are not using the same colors. Perhaps you mean #888, but that is converted to #888888, which is not the same as #80808080. See http://www.imagemagick.org/script/color.php
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help With Text Coloring

Post by fmw42 »

I get identical result using IM 6.9.9.31 and 7.0.7.19 Mac OSX Sierra for

Code: Select all

convert logo: -font Arial -pointsize 80 -quiet \
-draw "gravity center rotate 45 fill #80808080 text 0,12 \
'Licensed to Property Insight by Cook County Recorder of Deeds'" \
result6.png

Code: Select all

magick logo: -font Arial -pointsize 80 -quiet \
-draw "gravity center rotate 45 fill #80808080 text 0,12 \
'Licensed to Property Insight by Cook County Recorder of Deeds'" \
result7.png


And so do these. Note these have pointsize 120 whereas above has pointsize 80. Note also I have use the same fill color here as above.

Code: Select all

convert logo: -font Arial -pointsize 120 -fill "#80808080" \
-draw "gravity center rotate 45 text 0,12 \
'Licensed to Property Insight by Cook County Recorder of Deeds'" \
result6.png

Code: Select all

magick logo: -font Arial -pointsize 120 -fill "#80808080" \
-draw "gravity center rotate 45 text 0,12 \
'Licensed to Property Insight by Cook County Recorder of Deeds'" \
result7.png
dononyx
Posts: 5
Joined: 2018-01-06T10:01:31-07:00
Authentication code: 1152

Re: Help With Text Coloring

Post by dononyx »

magick does the same thing. Version: ImageMagick 7.0.7-19 Q16 x86_64 2018-01-06 http://www.imagemagick.org on a Mac with Sierra.
IM 6 is 6.9.5-9_2. When I try to use the #80808080 in the fill command, the convert gives me 50% of the page (left half). When I use #8080 I get the watermark but only the left half. It's weird. Just tried magick convert for kicks but did the same thing. It seems like its cropping?????
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help With Text Coloring

Post by fmw42 »

ImageMagick will not draw beyond the dimension of the input image. With the larger pointsize it may be off the image. If you post your image to some free hosting service such as dropbox.com and put the URL here, I can test your exact conditions. Post your two results also and the exact commands for one given image, so we can see what you say is wrong?

What do you get from

convert -version on IM 6 and magick -version on IM 7?

Do you have freetype installed?
dononyx
Posts: 5
Joined: 2018-01-06T10:01:31-07:00
Authentication code: 1152

Re: Help With Text Coloring

Post by dononyx »

Installed it with Homebrew. Dropbox does not support tiff. Freetype is installed. I set up an ftp for upload use Firefox as Safari loses its mind. ftp://img:img@75.149.200.204/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help With Text Coloring

Post by fmw42 »

I can confirm that it cuts off the right side of the page when saving to tif. It works fine when saving to gif. This happens in both IM 6 and IM 7
dononyx
Posts: 5
Joined: 2018-01-06T10:01:31-07:00
Authentication code: 1152

Re: Help With Text Coloring

Post by dononyx »

Any ideas?? I need tiff
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help With Text Coloring

Post by fmw42 »

I will report the bug. I have found no workaround yet.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help With Text Coloring

Post by fmw42 »

It seems to work fine if I re-add -compress Group4 in the command line.

Code: Select all

convert 1719519015.tif -font Arial -pointsize 120 -fill "#80808080" \
-draw "gravity center rotate 45 text 0,12 \
'Licensed to Property Insight by Cook County Recorder of Deeds'" \
-compress Group4 watermark6.tif

Code: Select all

magick 1719519015.tif -font Arial -pointsize 120 -fill "#80808080" \
-draw "gravity center rotate 45 text 0,12 \
'Licensed to Property Insight by Cook County Recorder of Deeds'" \
-compress Group4 watermark7.tif
dononyx
Posts: 5
Joined: 2018-01-06T10:01:31-07:00
Authentication code: 1152

Re: Help With Text Coloring

Post by dononyx »

You SIR are a GOD! Thanks SOOO MUCH!
Post Reply