NOTE: I have re-posted this to the IM users mailing list for others.

"Bella Pictures" on  wrote...
| Hi Anthony;
| 
|    Thank you so much for you reply to email, I am feather the outline edge, 
| with  this code
| Dim MagImg As New ImageMagickObject.MagickImage
| 
| Dim Files(8) As Object
| Files(0) = Path & "tmp.png"
| Files(1) = "-matte"
| Files(2) = "-virtual-pixel"
| Files(3) = "transparent"
| Files(4) = "-channel"
| Files(5) = "A"
| Files(6) = "-blur"
| Files(7) = "0x2"
| Files(8) = Path & "show.png"
| MagImg.Convert(Files)
| 
| also the problem after it finish my screen will go white for second or two 
| then it comes back , if you like you can download the program  from this 
| link http://www.thegreengenie.com/download-genie.html   download croma genie 
| I am only use imagemagick
| 
| to soften the edges , thank you
| 
NOTE: that if you just blur the alpha channel like that you will make
fully-transparent pixels of unknown color (usally black but not always)
semi-transparent and thus visible.

As that unknown color is usally black, this make work okay for images
containing a black outline, but it will be bad for images with other
colored outlines.

This is simular to the 'black' halo problem shown in
     http://imagemagick.org/Usage/bugs/resize_halo/
and  http://imagemagick.org/Usage/bugs/blur_trans/
Which IM took great pains to fix.

Caution is recomended, or the use of some method of replecating egde
colors outward.

One method....
* Blur the orignal image using -channel RGBA with a small increments
  of bluring (no more than 0x2)
* Overlay the original image over the blured image to restore the exact
  colors of the original pixels.
* Now copy the alpha channel of the first 'blurred' image in to the
  colors of the second image generated.

Yes it sounds complicated, BUT the results should represent the best
feathered result when the you only have just the 'shaped' image to play
with.

This will
  1/ Ensure the original pixel colors is used without any bluring
  2/ Set the colors of the added semi-transparent pixels surrounding
     the original image appropriatally.
  3/ Set the 'edge' pixels of the original pixels to the current
     semi-transparency.


I will add it to IM Examples somewhere, probably (channels, masks, and
transparency), though I am very busy at the moment.

This is also related to another section
   http://imagemagick.org/Usage/transform/#edge_jitter
On generating anti-aliased shapes and outlines from raw gray-scale
masks.

NOTE: this last set of examples, will probbaly move to 'masking' as it is
really more a general 'masking' method than 'edge detection' method.


  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
 DISCLAIMER - These opoi^H^H "damn", ^H, [esc :q :qq !q "shit!" :Q!  "Whaddya
 mean, Not an editor command?" :wq! ^C^C^C !STOP ^bye ^quit :quit! !halt ...
 ^w^q :!w :wq! ^D :qq!! ^STOP [HALT!   HALT!!! "Why's it doing this?" :stopit!
 :wwqq!! ^Z ^L ^ESC STOP  :bye  bye  bye! "Hey, what's this red button d..."
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to