[magick-users] How to correctly produce the sketch effect
Anthony Thyssen
anthony at griffith.edu.au
Sun Jul 29 18:17:14 PDT 2007
- Tong - on wrote...
| On Tue, 24 Jul 2007 12:44:50 +1000, Anthony Thyssen wrote:
|
| > Try using ...
|
| Thanks Anthony for your reply. I re-formulate the OP into the following n=
| ew
| question:
|
| How to correctly produce the sketch effect with pictures that have
| transparent backgrounds, I.e., those pictures whose backgrounds have been
| cleared using gimp?
|
| This is what I need to do[1]:
|
| . Duplicate the picture into 2 layers.
| . Gaussian Blur the top layer with a radius of 7 pixels.
| . Invert it (the top layer), and set its opacity to 50%.
| . Merge the two layers.
|
| The last two steps will effectively subtract the top layer from the
| origi= nal layer to obtain a high pass filtered version of the
| original picture.
|
| This is what I've tried:
| [1] http://www.gimp.org/tutorials/Sketch_Effect/
|
|
| convert pic1.png \( +clone -median 2 -blur 0x7 -negate \) \
| -matte -channel A -evaluate set 50% -compose plus -composite pic11.g=
|
| if and
|
| convert pic1.png \( +clone -median 2 -blur 0x7 -negate \) \
| -matte -channel A -evaluate divide 2 -compose plus -composite pic12.=
| gif
|
| First of all, please take a close look for me if the commands are in fact
| that what I planned to do. Now here are the problems:
|
| For the 1st command, the cleared background shows up again in the result.
Of course it does, you set the whole matte channel to 50% trasparency.
I would suggest you avoid using GIF, use MIFF or PNG, for working images
it is probably adding to the confusion as GIF can not save
semi-transparency. Also using 'display' to display results shows you
what parts are semi-transparent.
| As an attempt to fix it, I tried the 2nd one, but this time the cleared
| background shows up in bright colors, as opposed to the rest of images
| which have the dull high pass filtered effect.
|
| Please get the original picture from
| http://xpt.sourceforge.net/download/pic1.png
| and test for yourself, and see if you can find a way to make it work.
|
I displayed the second image results in 'display' and it shows correct
working. No bright colors.
What version of IM are you using?
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
Ok, pop quiz. There's a server on a bus. It's rigged to blow
if it drops below 50 transaction per second. What do you do?
--- WWW-Speed Home Page -- Simon Spero (ses at unc.edu)
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list