[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Using Image Magick with PHP

Posted on 2011-04-26
Medium Priority
Last Modified: 2012-05-11
Hello experts!

I am trying to use Image::Magick and I am receiving the following error:
Fatal error: Class 'Imagick' not found in...

I used the example code from http://www.php.net/manual/en/imagick.examples-1.php. I've also attached the code below.

As a troubleshooting step, I went to my CPanel and under the Perl Module Installer, it says that Image::Magick version 6.4.8 is installed.

Do I need a php include to make Image Magick work? I'm not sure what the next is to get Image Magick working.

$image = new Imagick('http://talktotucker.com/images/fctucker_logo.png');

$image->thumbnailImage(100, 0);

echo $image;

Open in new window

Question by:spoggles
LVL 84

Accepted Solution

Dave Baldwin earned 500 total points
ID: 35468989
Check the installation page http://www.php.net/manual/en/imagick.installation.php to see if you have what you need.  Apparently there is a PHP/PECL extension that you need also.  It's not built in.
LVL 13

Assisted Solution

haloexpertsexchange earned 500 total points
ID: 35470688
There are several different interfaces that you can use for ImageMagick and php.
The one you seem to be using is Imagick, which requires you to add a dll before it can work.
Here is a list from their site of program interfaces for php.
And is all else fails you can use a COM object for which the dll for using it is included in the install package for ImageMagick.
LVL 27

Assisted Solution

by:Lukasz Chmielewski
Lukasz Chmielewski earned 500 total points
ID: 35472980
Windows hosting ? Maybe you missed something ?

Assisted Solution

by:Vimal DM
Vimal DM earned 500 total points
ID: 35473985

Try the attached one,just upload the image file and crop or resize the image for your thumb

1) Upload file
2) Resize
3) Create Image

These are the three functions will work very well,

I have done so many works on this.


Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses
Course of the Month18 days, 22 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question