Using Image Magick with PHP

Posted on 2011-04-26
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 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('');

$image->thumbnailImage(100, 0);

echo $image;

Open in new window

Question by:spoggles
    LVL 82

    Accepted Solution

    Check the installation page 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

    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
    Windows hosting ? Maybe you missed something ?
    LVL 7

    Assisted Solution

    by:Vimal DM

    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

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now