Friday, February 1

Installing and configuring ImageMagick with WAMP on windows 7.

Installing and configuring ImageMagick with WAMP on windows 7.

Image Magick is a software suit to create, edit, compose or convert bitmap images. It support a wide range of image formats. You can also use image magick to resize, rotate, flop, mirror etc images. You can use the functionality of image magick from command line or you can use it via your favorite programming language.

Php has an ImageMagick class which uses the image magick api. With this class you get various methods with which you can create a web app to execute various functionalities such as image conversion from one format to another etc. you can check the imagick manual here.


I previously had an experience in installing the image magick suit and the corresponding php dll api on windows xp.

I had xampp 1.7 verison installed and image magick version 6.6. To get xampp working with image magic api, the php dll extension used was compiled using vc6(Visual studio 6). (Pretty old version, and it required a lot of trial and error in configuring the correct versions)

Now I had to install image magick on the latest windows 7 machine. Following was the configuration of the stystem.

1) OS – windows 7 Enterprise Edition service pack 1
2) System Type – 64-bit Operating System

Step 1

Installing wamp server

This time I wanted to go with wamp server instead of xampp server. There is a 32 bit as well as a 64 bit wamp server available for download. See their website

Initially I installed a 64bit wamp server setup but was not able to get image magick running. Also I read in one of the stackoverflow forum that image magick dll for 64 bit does not work. (No evidence or any solid statment) So I then downgraded to installing a 32 bit wamp server setup. Make sure you install Visual C++ 2010 SP1 Redistributable Package x86 or x64 as mentioned in the wamp website. See below screenshot.

Step 2

Check if wamp is installed correctly.

After installing wamp, for me the wamp server would not start and apache services would not install for me. When you right click wamp system tray icon and go to apache->services and click on Test port 80, it would say that

port 80 is used by Microsoft HTTPAPI/2.0. To install the service, we first need to release port 80.

There are various resources available which provide the solution. Some of the possibilities could be IIS server installed, Skype installed etc. If skype is installed and running. Either stop skype and then start wamp server, and then start skype or change the port in skype settings to not use port 80.

(Below screenshot is taken just to show where you can get the option to Test port)

I tried with disabling IIS, removing port 80 option in skype but it did not work. Then I changed the port to which apache listens to in httpd.conf file to port 7080 instead of port 80. And then my wamp setup work.


Step 3

Installing Image Magick software.

To be able to use the image Magick API in your program, you have to install the image magick software. There are various binaries of image magick available. You can learn about the latest version here.

However we require the binaries for which there is a compiled php dll available. Since wamp server uses the php version 5.3.12 (in my case). I was looking for an image magick binary which has a php dll available.

You can download the latest php builds for image magick here . However we also need the Image Magick binary. You can get the older binaries from here .

It has a lot if binaries available for download. After trial and error multiple windows restart, it turns out the best binary suitable which worked with the dll file was ImageMagick-6.8.0-0-Q16-windows-dll.exe.

Once you have Image Magick installed, check if it is working correctly. Go To command prompt and type

convert -version

Step 4

Configuring php dll file with wamp

Now that Image Magick is installed and you have the php dll file downloaded from the website, you can now save this dll file in your php ext folder. For me it was in


Update your php.ini file


Restart your system. Then start your wamp server. Once everything looks fine, check your phpinfo() for imagick installation.

Everything looks pretty good :) Go over to your project and start coding

Hope this helps someone. If you have any experience in Image Magick, or know about such tool, or you have any comments, share here

How I started reading?


Was browsing through reddit and found this interesting question. The OP (original poster?) had asked about everyone’s “how-they-started-reading” story. Sharing my story here.

I was never a reader. During my school days, I had read about Famous Five novels, but that was it. It was because I had nothing interesting to do during summer holidays. That was I think 8th grade.

Fast forward, I completed my engineering and took up a job in a startup. It was recession and everyone was getting laid off, so I took the first job I got. Not part of story, but I like to mention about 2008 here and there.

Work involved a lot of research, very little fun, so one day my boss said, we are going for a movie. All three of us (yeah the company was that small). The movie was Sherman joshi’s “Hello” based on Chetan bhagat’s “One night at call center”.

The theater was half empty, not even 20% people seen. We were enjoying the movie. At intermission, they displayed a paper note on the screen with one of our seat number. The note said that our seat was the hot seat and we had won a gift (Yay!).

After the movie, we happily rushed to the Ticket counter to collect our gift. From the exit of the screen to the Ticket counter, we had several guesses as to what could be our prize. Could it be free movie tickets for next movie, or lunch passes, hope it is lifetime membership to the theater. (Ok, the last one was a bit exaggerating). So we show our ticket, and what we get? We get chetan bhagat’s novel “One night at call center”, the movie we just saw. Disappointment. I don’t recall what made me ask my boss the book to read (he purchased ticket, so he was the rightful owner), took it home and was curious to know if there was any difference in the book and the movie. I read it page to page, it was simple and very interesting. That is when I decided, reading would be my favorite hobby.