imagick

Windows下PHP安装 Imagick 扩展

若如初见. 提交于 2020-02-27 18:24:27
1.下载拓展 下载地址一: http://windows.php.net/downloads/pecl/releases/imagick/ 下载地址二: https://pecl.php.net/package/imagick 要点: 注意对应php版本 ts还是nts x86还是x64 这里以phpinfo()为准 2. 安装拓展 解压上述文件后,将php_imagick.dll复制到php/ext目录 修改php.ini 加上extension=php_imagick.dll 3 下载imagemagick程序 下载地址: http://windows.php.net/downloads/pecl/deps/ 注意 软件版本对应 4 安装imagemagick程序 下载的文件解压后,将程序整体复制到无空格 无中文字符的目录中 E:\ImageMagick\ 配置环境变量,在“此电脑”右键“属性”,以此点击“高级” “环境变量” ,在 “系统变量”中找到键为path的数据,双击path,选择“新建”,将刚刚放程序的目录“E:\ImageMagick\bin”填入即可 将“E:\ImageMagick\bin”目录中的所有的以“.DLL‘为后缀的文件放入php的根目录 关闭-》启动服务器 查看 phpinfo 最后:+++++++++++++++++++++++++++++++++

Applying a logo to a tshirt using PHP Imagick

此生再无相见时 提交于 2020-02-04 05:52:17
问题 I'm new to imagemagic aka imagick on php and im trying to follow this thread using php code. I have tried to apply this logo onto a tshirt but couldn't do so by following the threas becuase i cannot find most of the methods in php like using displacement map to start with. What i have tried is the following code: $image = new Imagick($_SERVER['DOCUMENT_ROOT'] . '/images/VYLZsoD.jpg'); $logo = new Imagick($_SERVER['DOCUMENT_ROOT'] . '/images/logo.png'); $logo->resizeImage(200, 200, imagick:

Applying a logo to a tshirt using PHP Imagick

半腔热情 提交于 2020-02-04 05:52:07
问题 I'm new to imagemagic aka imagick on php and im trying to follow this thread using php code. I have tried to apply this logo onto a tshirt but couldn't do so by following the threas becuase i cannot find most of the methods in php like using displacement map to start with. What i have tried is the following code: $image = new Imagick($_SERVER['DOCUMENT_ROOT'] . '/images/VYLZsoD.jpg'); $logo = new Imagick($_SERVER['DOCUMENT_ROOT'] . '/images/logo.png'); $logo->resizeImage(200, 200, imagick:

What is difference between setImageCompressionQuality vs setCompressionQuality - Imagick

妖精的绣舞 提交于 2020-01-24 14:46:26
问题 I found two methods in Imagick for set image compression quality A ) setImageCompressionQuality B ) setCompressionQuality so I want to know which one is best and why in below condition I read that setCompressionQuality method only works for new images (?) I am trying to compress a file jpeg/png $im = new Imagick(); $im->readImage($file); // path/to/file $im->setImageCompressionQuality($quality); // 90,80,70 e.g. $im->writeImage($file); 回答1: The method setImageCompressionQuality sets

What is difference between setImageCompressionQuality vs setCompressionQuality - Imagick

风流意气都作罢 提交于 2020-01-24 14:43:34
问题 I found two methods in Imagick for set image compression quality A ) setImageCompressionQuality B ) setCompressionQuality so I want to know which one is best and why in below condition I read that setCompressionQuality method only works for new images (?) I am trying to compress a file jpeg/png $im = new Imagick(); $im->readImage($file); // path/to/file $im->setImageCompressionQuality($quality); // 90,80,70 e.g. $im->writeImage($file); 回答1: The method setImageCompressionQuality sets

ImageMagick No decode delegate for this image format

孤街醉人 提交于 2020-01-22 20:02:07
问题 I work under windows and wamp server. this is my PHP code with Imagick $imagick = new Imagick($_SERVER['DOCUMENT_ROOT'] . '/' . $this->_name); where $_SERVER['DOCUMENT_ROOT'].'/'.$this->_name displays : D:/Sources/my_project/public/media/2/9/1/05201502/55450e1b6543a05201502_9.PNG I checked that image and it does exist in the folder. But Imagick throws an exception : Uncaught exception 'ImagickException' with message 'no decode delegate for this image format `D:/Sources/my_project/public/media

Class imagick not found when ran from CLI

好久不见. 提交于 2020-01-15 11:54:49
问题 $im = new imagick($file); This line of code will work fine when ran from my browser, but when I try to run it from command line (CLI) then I get the following error... Class 'imagick' not found Any ideas why it won't work from CLI? 回答1: Found a solution: sudo aptitude install make php5-dev php-pear sudo aptitude remove php5-imagick sudo aptitude install libmagick9-dev sudo pecl install imagick sudo /etc/init.d/apache2 restart http://kvz.io/blog/2008/02/27/class-imagick-not-found/ 回答2: The php

Class imagick not found when ran from CLI

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-15 11:54:37
问题 $im = new imagick($file); This line of code will work fine when ran from my browser, but when I try to run it from command line (CLI) then I get the following error... Class 'imagick' not found Any ideas why it won't work from CLI? 回答1: Found a solution: sudo aptitude install make php5-dev php-pear sudo aptitude remove php5-imagick sudo aptitude install libmagick9-dev sudo pecl install imagick sudo /etc/init.d/apache2 restart http://kvz.io/blog/2008/02/27/class-imagick-not-found/ 回答2: The php

Class imagick not found when ran from CLI

南楼画角 提交于 2020-01-15 11:54:09
问题 $im = new imagick($file); This line of code will work fine when ran from my browser, but when I try to run it from command line (CLI) then I get the following error... Class 'imagick' not found Any ideas why it won't work from CLI? 回答1: Found a solution: sudo aptitude install make php5-dev php-pear sudo aptitude remove php5-imagick sudo aptitude install libmagick9-dev sudo pecl install imagick sudo /etc/init.d/apache2 restart http://kvz.io/blog/2008/02/27/class-imagick-not-found/ 回答2: The php

Class imagick not found when ran from CLI

余生颓废 提交于 2020-01-15 11:54:08
问题 $im = new imagick($file); This line of code will work fine when ran from my browser, but when I try to run it from command line (CLI) then I get the following error... Class 'imagick' not found Any ideas why it won't work from CLI? 回答1: Found a solution: sudo aptitude install make php5-dev php-pear sudo aptitude remove php5-imagick sudo aptitude install libmagick9-dev sudo pecl install imagick sudo /etc/init.d/apache2 restart http://kvz.io/blog/2008/02/27/class-imagick-not-found/ 回答2: The php