[magick-users] Magick++ fillPattern() to preserve pattern transparency
Anthony Thyssen
anthony at griffith.edu.au
Wed May 7 01:16:02 PDT 2008
Elie Zedeck RANDRIAMIANDRIRAY on wrote...
| Hi again everyone,
|
| I have found the solution to my challenge.
|
| The trick is this:
|
| 1. Create a copy of the original image (same dimension)
| 2. Based on the size of the pattern image (the GIF file), run a little
| loop on the X and Y coords that will used composite to place the image
| on the copy with the transparency preserved.
| 3. Use that copy image as the fillPattern for the original image.
|
| Hope that will help you guys who are trying to do the same thing.
|
For an alturnative method of generating a tiled canvas, that will also
tile an animation (sequence of images) using a trick of the new -distort
operator, see IM examples, Animation Modifictions, Glitter Tiles...
http://imagemagick.org/Usage/anim_mods/#glitter_tiles
Other non-animation methods are also provided in IM examples, Canvas
Generation, Tiles Canvases...
http://imagemagick.org/Usage/canvas/#tile
There are lots of ways, without needing to do the pixel transfer
yourself, and all methods should be about to be done from the various
API languages.
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
"... Ken Thompson, Dennis Ritchie and Brian Kernighan have admitted that
the operating system and the programming language that they designed is a
clever April fools-day prank, that has survived the last 20 years. ..."
--- Vogon News Service -- April 1, 1991
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list