Hello Everyone!

I have been using ImageMagick with no problem, however, in using PerlMagick I 
cannot seem to get the mask feature working, no matter what I try.  I have 
installed the latest ActiveState perl on my website and the latest ImageMagick. 
 I can use most of the other features in ImageMagick, however, when I try to 
use a mask, nothing happens like I'd expect.  

I saw some earlier discussion on having XML libraries installed, which I 
checked, and do have.  So I do not think it is that problem.  I also tried to 
use the 'clip-mask' property but nothing worked there as well.

The code I am using is as such:

   use Image::Magick;

   $swatch  = Image::Magick->new; 
   $mask    = Image::Magick->new;
   $result  = Image::Magick->new;

   $res = $result->Read('products/grey_lamps.jpg');
   $res = $swatch->Read('swatches/red.gif');
   $res = $mask->Read('masks/mask_lamps.png');

   
$result->Composite(image=>$swatch,compose=>'hardlight',tile=>true,mask=>$mask);

   print "Content-type: image/jpeg\n\n";
   binmode STDOUT;

   $result->Write('jpg:-');

The image files being used are:

http://www.asylumstudioproductions.com/swatches/products/grey_lamps.jpg
http://www.asylumstudioproductions.com/swatches/swatches/red.gif
http://www.asylumstudioproductions.com/swatches/masks/mask_lamps.png

No matter what I do I cannot get this to work.  I have no problem on the same 
machine running 'compose' commandline.  Any help would be incredibly 
appreciated!

Rick Burnett
Asylum Studio Productions
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to