Page 1 of 1

Shadowed Text over an existing image

Posted: 2008-05-27T14:25:42-07:00
by riegel
This may be overly simple but I can't seem to get my head around the problem. I am able to get the examples found on Anthony's excellent resource working just fine, but I am getting stuck. Here is what I am trying to do.

I would like to create some text and place it on an image. This works...

Code: Select all

convert -font TRAJANPB.TTF -pointsize 72 -fill black -annotate +28+68 'Journey' -blur 0x3 -font TRAJANPB.TTF -pointsize 72 -fill white -annotate +25+65 'Journey' logo.jpg logoshadow.jpg
It creates white text "Journey" with a black drop shadow. The problem is it blurs the image also. I just want to blur the text not the background image.

I am not sure how to get it to apply the -blur 0x3 to the text only.

Any help will be greatly appreciated.

Terry Riegel

Re: Shadowed Text over an existing image

Posted: 2008-05-28T06:56:51-07:00
by riegel
As I have looked at the example I wonder if the solution is with the -clone operator. I don't really understand how this works though.

Re: Shadowed Text over an existing image

Posted: 2008-05-28T08:05:31-07:00
by riegel
Ok, I am still trying to get drop shadowed text over an image. I have come up with the following...

Code: Select all

convert background.png
\(-size 780x124 xc:transparent
  -font TRAJANPB.TTF -pointsize 60 -fill black
  -annotate +28+67 'Journey'
  -blur 0x8
\)
+composite
PNG:logo.png
This seems to work except for the -blur 0x8. If I change the xc:transparent to xc:lightblue then the blur works but it doesn't overlay on the graphic since now the bg is light blue instead of transparent.

Any ideas would be appreciated.

Thanks,

Terry

Re: Shadowed Text over an existing image

Posted: 2008-05-28T08:32:04-07:00
by riegel
Ok, I think I have a solution to my problem. I am posting here for any that might have the same issue.

Code: Select all

convert background.png
\( -size 780x124 xc:none
  -font TRAJANPB.TTF -pointsize 60
  -fill black
  -annotate +28+67 'Journey'
  -channel A
  -blur 0x3
  -font TRAJANPB.TTF -pointsize 60
  -fill white
  -annotate +25+65 'Journey'
\)
+composite logo.png 

Re: Shadowed Text over an existing image

Posted: 2008-06-04T23:15:24-07:00
by anthony
-clone makes a new copy of the image, generally in a seperate 'image sequence' for seperate processing to the original.

Read Parenthesis first, then look at -clone further down. You will then understand what is going on.