imagick

No formats supported in PHP/ImageMagik/imagick

我的未来我决定 提交于 2019-12-11 10:11:24
问题 I've installed pecl-imagick from FreeBSD ports and it can't do a thing with images. phpinfo() reports this: ImageMagick number of supported formats: 0 ImageMagick supported formats: no value But ImageMagick installed correctly and show all it's stuff: $ convert -list configure ... DELEGATES bzlib fftw fontconfig jpeg jng lzma png zlib ... What could be wrong and how to fix it? 回答1: I found that having an extension for GraphicsMagick (a "better" fork) installed causes that. If you don't feel

“pecl install imagick” fails on mountain lion. can't find “wand/MagickWand.h”

邮差的信 提交于 2019-12-11 06:34:07
问题 Pretty much what it sounds like. I did: brew install imagemagick That seemed to go well--so the problem is not with imagemagick itself. I then tried to install the PHP extension (updating pear and pecl before trying): pecl install imagick It fails. Here's what happens near the end: running: make /bin/sh /private/tmp/pear/install/pear-build-brad.garrettZppuRq/imagick-3.0.1/libtool --mode=compile cc -I. -I/private/tmp/pear/install/imagick -DPHP_ATOM_INC -I/private/tmp/pear/install/pear-build

Imagick constructor crashes PHP/CGI

心不动则不痛 提交于 2019-12-11 06:25:53
问题 When I call the Imagick constructor PHP/CGI crashes. The imagick .dll is loaded in the php.ini file (extension) and I've got imagick installed. I am using EngineX (NGINX) and PHP 5.3.4. I am using thread safe version of PHP and Imagick.dll (ext) Any ideas why this is happening? 回答1: Check which compiler your version of PHP is compiled with. If you're using the Imagick dll file from the author it will be compiled with VC9. You need to have a version of PHP that is also compiled with VC9 for

Imagick Not Loaded in PHP

て烟熏妆下的殇ゞ 提交于 2019-12-11 06:23:56
问题 I have installed Imagick on Ubuntu 12.04 but still i get Class 'Imagick' not found When I check through terminal php -m I get [PHP Modules] bcmath bz2 calendar Core ctype date dba dom ereg exif fileinfo filter ftp gettext hash iconv imagick json libxml mbstring mhash openssl pcntl pcre PDO Phar posix readline Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip zlib [Zend Modules] but when i check loaded extension

imagick console commands into PHP Imagick

老子叫甜甜 提交于 2019-12-11 06:02:54
问题 Can anyone explain me how to convert imagick cli command that are working fine into PHP code using Imagick pecl? I am not familiar enough with syntax of convert command and it is complex for me to do it quickly. You may not read this heap of text bellow, just help to convert cli command to PHP. :) I have one partially transparent figure located on not transparent white background(original image). With filling that transparent figure some background color/image I'll have many colored figures

setImageBias is not working on a LAMP box

▼魔方 西西 提交于 2019-12-11 05:27:26
问题 I have this code: <?php $image = new Imagick(__DIR__ . DIRECTORY_SEPARATOR . '__stack__.jpg'); $image->medianFilterImage(2); $image->setColorspace(Imagick::COLORSPACE_GRAY); $image->medianFilterImage(2); $xKernel = array(-0.70,0,0.70,-0.70,0,0.70,-0.70,0,0.70); $max = $image->getQuantumRange(); $max = $max["quantumRangeLong"]; $image->setImageBias(0.50 * $max); // -bias 50% $image->convolveImage($xKernel, Imagick::CHANNEL_ALL); header('Content-type: image/jpeg'); echo $image; Which I'm

PHP library object error

旧巷老猫 提交于 2019-12-11 02:06:31
问题 I am having an issue with imagick php library. I am doing a recursive search in my file system and look for any pdf files. $it = new RecursiveDirectoryIterator("/test/project"); $display = Array ('pdf'); foreach(new RecursiveIteratorIterator($it) as $file){ if (in_array(strtolower(array_pop(explode('.', $file))), $display)) { if(file_exists($file)){ echo $file; //this would echo /test/project/test1.pdf $im = new Imagick($file); $im->setImageFormat("jpg"); file_put_contents('test.txt', $im); }

ImageTragick “fix” broke my script and not sure how to fix

孤街醉人 提交于 2019-12-11 01:14:28
问题 Using Imagick, I'm placing custom jpgs into an svg and then converting them to a jpg. Because of the ImageTragick, my placed jpegs never show up and my font doesn't convert. Because of the vulnerability my host upgraded their policy.xml and now it's broken. <policymap> <!-- <policy domain="system" name="precision" value="6"/> --> <!-- <policy domain="resource" name="temporary-path" value="/tmp"/> --> <policy domain="resource" name="memory" value="32MiB"/> <policy domain="resource" name="map"

PHP Imagick - “-quantize transparent” equivalent

风格不统一 提交于 2019-12-11 01:09:54
问题 Is there a PHP Imagick equivalent for -quantize transparent ??? -quantize transparent usage example note: seach for '-quantize transparent' within page 回答1: Qunatize is supported by PHP's Imagick extension; however, little documentation has been authored. Luckily, the example from "Color Quantization and Transparency" is straightforward. convert alpha_gradient.png -quantize transparent \ +dither -colors 15 alpha_colors_15qt.png From this example, we can determine the 5 arguments needed by

IMagick check lightness image

╄→гoц情女王★ 提交于 2019-12-10 22:53:26
问题 I need to be able to write some text automatically inside an image. According to the image lightness, the script must write in white or black. So how do I check the lightness/darkness of an image with Imagick? 回答1: You could do something like this: // Load the image $imagick = new Imagick("image.jpg"); // convert to HSL - Hue, Saturation and LIGHTNESS $imagick->transformImageColorspace(imagick::COLORSPACE_HSL); // Get statistics for the LIGHTNESS $Lchannel = $imagick->getImageChannelMean