[prev in list] [next in list] [prev in thread] [next in thread] 

List:       imagemagick-user
Subject:    [magick-users] Help with MagickCompositeImage (PHP MagickWand) -
From:       zgwerke <zg () zgwerke ! com>
Date:       2005-02-26 18:29:34
Message-ID: 42213895.8070002 () zgwerke ! com
[Download RAW message or body]

I have two images - one, a photo, and two, a (smaller, ribbon-sized) 
copyright notice.  In ImageMagick I used composite; I'm trying PHP's 
MagickCompositeImage and none of it seems to work (is there any way to 
get this program to be verbose about errors??)

Here is the gist of it:

      # File exists
        $oldimlocation = "/home/site.com/image.jpg";  
      # File to be created
        $imdirlocation = "/home/site.com/imagecopyright.jpg";
        $fsized = NewMagickWand();
        $overlay = NewMagickWand();
        $workwand = NewMagickWand();
      # Copyright graphic
        $copyrightimg = "/home/site.com/htdocs/newcopyright.jpg";
        $fulls = MagickReadImage($fsized,$oldimlocation);
        $crigh = MagickReadImage($overlay,$copyrightimg);
        $wid = MagickGetImageWidth($fsized);
        $hei = MagickGetImageHeight($fsized);
        $proportion = $hei / $wid; $outwid = 1280; $outhei = (1280 * 
$proportion);
        $oimg = MagickScaleImage($fsized,$outwid,$outhei);
        $outimg = 
MagickCompositeImage($workwand,$fsized,MW_OverCompositeOp,0,0);
        $outimgB = 
MagickCompositeImage($workwand,$overlay,MW_OverCompositeOp,0,0);
        $outf = MagickWriteImage($workwand,$imdirlocation);

The two lines that do not work are the MagickCompositeImage lines - I 
have tried other composite operators, even tried (as the manpage 
suggests it might need) using a zero since it says integer.  It just 
stops without compositing anything.

-doug
_______________________________________________
Magick-users mailing list
Magick-users@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic