登录 | 注册 | 论坛 | 搜索 | 会员中心 | 关于我们
论坛首页    »   PHP技术交流   »    [magick-users] Help with MagickCompositeImage  
  
上一主题 下一主题
 标题:[magick-users] Help with MagickCompositeImage  

kuaiyigang
状态: 新的一年,新的战斗
等级: 管理员发帖: 474帖
排名: 第1名积分: 2324分
来自: 湖北随州
离线: 2008年10月31日
        
1 楼

[magick-users] Help with MagickCompositeImage

 
http://studio.imagemagick.org/pipermail/magick-users/2005-February/014825.html







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

  www.kuaiyigang.com
2008-07-02 01:51:03      
  
11/11


Powered by BbsFine 0.2 © 2002-2008 Xingmo.com Archiver
星模公司 ©2008 版权所有 京ICP备05011686号