[magick-users] filter image to use in opengl
Anthony Thyssen
A.Thyssen at griffith.edu.au
Mon Jan 5 17:38:21 PST 2009
On Mon, 05 Jan 2009 11:49:42 +0100
magick-users-bounces at imagemagick.org wrote:
| Hi,
|
| I have an image exported by inkscape to use in a 3d program, my problem
| is that the border of the image is not really conveniant with the alpha
| blending.
| What i would like is to process the image to extend the border of the
| rgb then the aplha will fade to the good color of border and not a
| background flat white.
| I thought to a filter that could detect the border of image then extend
| it, but i did not success to do it. I am not really experienced in
| filter processing, so advise will be welcome.
|
| here the picture to understand what i am explaining
|
>From next mail...
| Here the link to image i guess attached files are removed on the mailing
| list:
| http://www.plopbyte.net/tmp/rgb.png
| http://www.plopbyte.net/tmp/alpha.png
| http://www.plopbyte.net/tmp/Screenshot.jpg
|
What you are wanting is either image masking
http://www.imagemagick.org/Usage/compose/#mask
or adding that mask as an alpha channel, for creating a PNG image with
appropriate transparency ('CopyOpacity' Alpha Composition)...
http://www.imagemagick.org/Usage/compose/#copyopacity
All three methods are looking at in
Using a Mask Image with Fonts
http://www.imagemagick.org/Usage/fonts/#mask
You can ignore the parts about creating the mask as you already have
that.
You may also be interested in 'Feathering'
where you blur and the level modify the alpha channel of an image.
http://www.imagemagick.org/Usage/convolve/#feathering
NOTE the above was just updated, give it a day or so for the new example
(with a GIF image of a person) to appear.
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
"Around here we've got a name for people what talks to dragons."
"Traitor?" Wiz asked apprehensively.
"No. Lunch." -- Rick Cook, "Wizadry Consulted"
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list