step-by-step instructions for installing IMAGEMAGICK on WAMP?

I know this is old post but I spend my all day to make it work, so here are the steps that helped me: Download ImageMagick Binary Release – http://www.imagemagick.org/script/download.php Install in C:\imagemagick, on last step check “Add application directory to your system path“ Download Imagick DLL: PHP5.6.x version from http://www.peewit.fr/imagick/ (I have 5.6+ version … Read more

convert:not authorized `aaaa` @ error/constitute.c/ReadImage/453

Note: the solution in this and other answers involves disabling safety measures that are there to fix arbitrary code execution vulnerabilities. See for instance this ghostscript-related and this ubuntu-related announcement. Only go forward with these solutions if the input to convert comes from a trusted source. I use ImageMagick in php (v.7.1) to slice PDF … Read more

How do I add exif data to an image?

You can save a large amount of space, especially if you have a large number of images.. Add the following to text.txt (format of the IPTC tags taken from here): 2#110#Credit=”My Company” 2#05#Object Name=”THE_OBJECT_NAME” 2#55#Date Created=”2011-02-03 12:45″ 2#80#By-line=”BY-LINE?” 2#110#Credit=”The CREDIT” 2#115#Source=”SOURCE” 2#116#Copyright Notice=”THE COPYRIGHT” 2#118#Contact=”THE CONTACT” 2#120#Caption=”AKA Title” Strip all existing exif data from the … Read more

Resize animated GIF file without destroying animation

if you have imagemagick access, you can do this: system(“convert big.gif -coalesce coalesce.gif”); system(“convert -size 200×100 coalesce.gif -resize 200×10 small.gif”); this is most likely possible with the imagemagick plugin if you don’t have system() access NOTE: this may create a larger filesize though a smaller dimensions image due to coalescing essentially deoptimizing the image. UPDATE: … Read more

Convert SVG image to PNG with PHP

That’s funny you asked this, I just did this recently for my work’s site and I was thinking I should write a tutorial… Here is how to do it with PHP/Imagick, which uses ImageMagick: $usmap = ‘/path/to/blank/us-map.svg’; $im = new Imagick(); $svg = file_get_contents($usmap); /*loop to color each state as needed, something like*/ $idColorArray = … Read more