Questions tagged [imagick]

Imagick is a native php extension to create and modify images using the ImageMagick library. Please upload example images to imgur.com (or other site) if your question is asking why Imagick is not producing the images you are expecting, so that people can reproduce your problem.

Imagick is a PHP extension to create and modify images using the ImageMagick library. There is also a version of Imagick available for HHVM. Although the two extensions are mostly compatible in their API, and they both call the ImageMagick library, the two extensions are completely separate code-bases.

ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF.

The documentation for PHP Imagick is in the PHP Manual. A large number of examples for Imagick with code and the expected output are at PHPImagick.com


Resources :

1893 questions
0
votes
1 answer

PHP - imagick: close open areas in image

After the follow code: $im = new \Imagick('fu.png'); $im->thresholdimage(0.9, 127); I'm getting this image: so I need to close the open areas. When I copy the code from http://phpimagick.com/Imagick/morphology?morphologyType=9 which is: $im = new…
Eddy Unruh
  • 576
  • 1
  • 5
  • 18
0
votes
2 answers

PHP Imagick reinterpretation of PNG IDAT chunks

I noticed that PHP Imagick changes the IDAT chunks when processing PNGs. How exactly is this done? Is there a possibility to create IDAT chunks that remain unchanged? Is it possible to predict the outcome of Imagick? Background information to this…
user7390973
  • 63
  • 1
  • 6
0
votes
1 answer

Remove white background from the image and make it transparent using PHP

I got this code to do that: $im = new Imagick("test.jpg"); $im->paintTransparentImage($im->getImageBackgroundColor(), 0, 500); $im->setImageFormat('png'); $im->writeImage('finish.png'); And this is the result (I added manually pink background to…
Eddy Unruh
  • 576
  • 1
  • 5
  • 18
0
votes
0 answers

\Imagick not loaded on the Symfony2 command line

In an Symfony2 controller I'm processing some images that belong to a product. When the images are added to a product the images are cropped with Imagick. This is done in the Entity of that product with the following code: $image = new \Imagick(…
Tom
  • 1,547
  • 7
  • 27
  • 50
0
votes
0 answers

Add padding when resize size bigger than source size

I'm trying to resize images with imagemagick in PHP. When the source image is bigger than the resize size everything works fine, but it doesn't work correct when the source image is smaller than the resize size. Then the image needs to get some…
Roger
  • 82
  • 1
  • 8
0
votes
1 answer

Why am I getting error class ImagePixel not found?

Here is a snippit of my code: //$page defined above $opening_border = new ImagickDraw(); $opening_border->setFillColor('none'); $opening_border->setstrokecolor(new…
AllisonC
  • 2,973
  • 4
  • 29
  • 46
0
votes
1 answer

What is the modern way to blur an image with PHP?

I want to blur images dynamically, but it has to be a very strong blur, so it can only be assumed what the real image is. I read this question where imagefilter is used. But this solution didn't blur my image enough. Somewhere I also read that…
AlexioVay
  • 4,338
  • 2
  • 31
  • 49
0
votes
1 answer

Imagick PHP (How to resize each image from database?)

I have been trying to resize each image from database before pushing it into an array. The array contains the image path(URL) where I would like to display the resize image onto a grid view as the original images are too big and takes too long to…
arsenallavigne
  • 131
  • 1
  • 2
  • 16
0
votes
1 answer

Fatal error : Class 'Imagick' not found Ubuntu 14.04.5 LTS

I'm running Ubuntu 14.04.5 LTS I've run following commands sudo apt-get update sudo apt-get install imagemagick sudo apt-get install php5-imagick sudo apt-get update Edited my php.in /etc/php/5.6/apache2/php.ini added following at end of…
Kaushal Suthar
  • 410
  • 5
  • 24
0
votes
1 answer

how can i get the same image as origin after converting adobeRGB picture into sRGB with PHP

I have to work with an image with PHP GD. The problem is when I copy the original picture, the colors are not the same. original Picture : OriginalPicture People told me to convert my jpg into sRGB profil instead AdobeRPG. So I did it: $image =…
0
votes
0 answers

How to clean background captcha image using imagick

I try to clean background captcha image using php imagick method and i used convert method as an alternative on console but i got same result. But it's not really worked. Then i will use tesseract ocr for getting captcha code. There is a code for…
frkcn
  • 9
  • 3
0
votes
1 answer

Cannot install php-imagick on Ubuntu Xenial

I tried to install the php module for imagemagick on my ubuntu server: #@server:/#$ sudo apt-get install php-imagick Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig Einige…
Smeaven
  • 147
  • 3
  • 14
0
votes
0 answers

Fatal error: Uncaught exception 'ImagickException' with message 'Imagick::readimage(): Connection timed out'

how to fix this error, Fatal error: Uncaught exception 'ImagickException' with message 'Imagick::readimage(): Connection timed out'...please help me... readImage($img_url_images); …
user6832030
0
votes
1 answer

Imagick php wamp server -none supported formats

After tons of tutorials around internet I'm out, none seemed to work. My steps: Step 1) Gather information about my wamp Architecture: x64(64-bit) PHP-version: 5.6.25 PHP Extension Build: TS, MSVC11 Step 2) Download…
MrFreeman555
  • 98
  • 1
  • 12
0
votes
1 answer

ImageMagick - "unable to draw image" - using SVG

I'd like to create a vector PDF using an SVG string. But ImageMagick draw function always returns 'unable to draw image' 500 error. $image = new \Imagick(); $draw = new \ImagickDraw(); $draw->setVectorGraphics(''.$svg.''); …
pape04
  • 57
  • 9