[magick-users] ImageMagick (Blur) query
Anthony Thyssen
anthony at griffith.edu.au
Thu Oct 4 18:42:06 PDT 2007
"Ravinderjit Singh. Sidhu" on wrote...
| Dear ImageMagick Friends,
| =20
| I need your help regarding blur effect on text !
| =20
| I am trying (Blur) in windows platfom on command line:
| ------------------------------------------------------------------------
| -----------
| convert -size 2100x1200 xc:white ^
| ( -font arial -pointsize 105 -fill rgb(0,0,0) -draw " text 100,
| 100 '1.ImageMagick'" -blur 1,1 ) ^
| ( -font arial -pointsize 105 -fill rgb(0,0,0) -draw " text 100,
| 300 '2.ImageMagick'" -blur 0,8 ) ^
| ( -font arial -pointsize 105 -fill rgb(0,0,0) -draw " text 100,
| 600 '3.ImageMagick'" -blur 0,8 ) ^
| ( -font arial -pointsize 105 -fill rgb(0,0,0) -draw " text 100,
| 900 '4.ImageMagick'" -blur 1,1 ) ^
| output.BMP
| =20
| Output
| ----------
| Output.bmp shows 4 black text lines ("ImageMagicK") at 4 different
| location (with blur effect).
| Line 1 and 4 has same blur attributes "-blur 1,1". (But the effects are
| different in output. Why?)
| Line 2 and 3 has same blur attributes "-blur 0,8". (But the effects are
| different in output. Why?)
| and How i can get the same blur effect on line (1 & 4) and (2 & 3) =20
Blur blurs an image, you only have one image in memory so each
successive blur blurs the same image over and over!
As such older parts get more blurred than the younger parts.
The fact that you used parenthesis without reading, cloning or creating
an image in it is an error, and one that IM should probably report!
as technically you don't have an image inside the parenthesis section
to draw on or blur.
Solution, create separate images to blur.
This is where you really need parenthesis,
convert -size 2100x1200 -font arial -pointsize 105 \
\( xc:none -fill red -annotate +100+100 "1.ImageMagick" -blur 0,1 \) \
\( xc:none -fill black -annotate +100+300 "1.ImageMagick" -blur 0,8 \) \
\( xc:none -fill red -annotate +100+600 "2.ImageMagick" -blur 0,1 \) \
\( xc:none -fill black -annotate +100+900 "2.ImageMagick" -blur 0,8 \) \
-background white -flatten win:
As you don't change the font or pointsize settings, you don't need to
repeat them. I also will not be changing the -size setting.
Also I just use 0 for ALL the blur radius so IM can pick something
appropriate. And I told you about -annotate in a previous email.
The final -flatten overlays all the separate images that was generated
on to a white background image.
I suggest you read more on IM Examples. Especially "Basic Usage" "Text
To Image Handling" and "annotating images" in the 'practical' column
http://imagemagick.org/Usage/
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
"When I became a man I put away childish things, including
the fear of childishness and the desire to be very grown up."
-- C.S. Lewis
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list