Watermark text, with almost invisible text

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
ultranerds
Posts: 43
Joined: 2009-02-12T02:05:15-07:00

Watermark text, with almost invisible text

Post by ultranerds »

Hi,

I'm trying to convert an image (black background) , so that it has our website name going across it. So far I have:

Code: Select all

convert \
  -background None -fill \#333 \
  -pointsize 20 label:Site\ Name \
  -rotate -40 +repage \
  +write mpr:TILE +delete \
  Slide-0.jpg -alpha set \
  \( +clone \
    -fill mpr:TILE -draw "color 0,0 reset" \
  \) \
  -composite \
  test.jpg
The issue with this, is that the text is a bit overpowering. I've tried going for a grey - but is it possible to do an opacity on the new text layer? I've only fumbled this out of queries I've found online - so I'm far from an expert haha

Thanks!

Andy

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

Re: Watermark text, with almost invisible text

Post by fmw42 »

You are close. All you need to do is add alpha to your color. Here I add alpha=8 in hex (so approx half transparent) as #3338. I put the hex colors in quotes as an alternate to escaping the #.

Code: Select all

convert \
-background None -fill "#3338" \
-pointsize 20 label:Site\ Name \
-rotate -40 +repage \
+write mpr:TILE +delete \
Slide-0.jpg -alpha set \
\( +clone \
-fill mpr:TILE -draw "color 0,0 reset" \
\) \
-composite \
test2.jpg
Try that.

ultranerds
Posts: 43
Joined: 2009-02-12T02:05:15-07:00

Re: Watermark text, with almost invisible text

Post by ultranerds »

Ah you star - that did the job perfectly :) I ended up going with #3332 as I didn't want it too visible.

Thanks!

Post Reply