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. Regards, Elie Zedeck. On Thu, 2008-04-17 at 19:04 +0300, Elie Zedeck RANDRIAMIANDRIRAY wrote: > Hi all, > > I have a GIF image which I want to use as the fill pattern for another > Image object, and then place on the main image; but all my tries failed > so far. > > Here is the steps that I'm currently using to place the pattern on an > existing image. > > --- begins --- > Color transparent(0, 0, 0, QuantumRange); > > Image tempFrame(backgroundImage); > tempFrame.backgroundColor(transparent); > gifImage.backgroundColor(transparent); > tempFrame.fillPattern(gifImage); > tempFrame.colorFuzz(35); > > tempFrame.draw(DrawableColor(pointX, pointY, FloodfillMethod)); > > mainImage.composite(tempFrame, CenterGravity, OverCompositeOp); > --- ends --- > > The result of this process is almost the expected one, expect that the > background of the GIF image file is not transparent, but Black. > > Any help would be appreciated. If I find the solution, I'll keep you > guys updated. > > Thanks. > > _______________________________________________ > Magick-users mailing list > [email protected] > http://studio.imagemagick.org/mailman/listinfo/magick-users _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
