I managed to get around building Imagick with VC++ 2005.
These DLLs are experimental and I take no responsibility of anything. If these work I will continue providing these windows builds and possibly add static builds.
http://valokuva.org/outside-blog-content/imagick-windows-builds/071002/
Please ref watson’s post about how to install on Windows:
http://redux.imagemagick.org/discourse-server/viewtopic.php?t=4708
#1 by Jack Sleight on October 4, 2007 - 12:09 am
Quote
What’s the difference between these DLL’s and the ones that come in the PECL zip file on snaps.php.net? Which is the best one to use?
#2 by Mikko Koppanen on October 4, 2007 - 9:37 am
Quote
The PECL-dev zip DLLs are getting a bit outdated. They are statically compiled against ImageMagick 6.3.3 Q16. Im trying to provide a dynamically compiled alternative since many people have asked that.
These DLLs should be use with ImageMagick 6.3.6 and now there is both Q8 and Q16 versions.
#3 by Jack Sleight on October 5, 2007 - 1:28 am
Quote
Hi Mikko,
Thanks for the explanation. I’ve now installed ImageMagick 6.3.6 Q8, with your DLL, and PHP detects it and loads it fine. However there is an error when you try to load an image:
$imagick = new Imagick(‘test.bmp’);
=
ImagickException: unable to open image `E:E:\Server\sandbox\test.bmp’: Invalid argument in E:\Server\sandbox\test.php on line 5
Seems to be repeating the drive letter twice. Also phpinfo says the module version is 2.0.1-b1, not 2.0.0, if that makes any difference.
#4 by Jack Sleight on October 5, 2007 - 1:33 am
Quote
That’s with the “php_imagick_5_2_4_dyn-Q8.dll 03-Oct-2007 21:52″ dll btw.
#5 by Mikko Koppanen on October 5, 2007 - 9:31 am
Quote
Does this happen if you give a full path to the image? 2.0.1-b1 = 2.0.1 beta1 so the version is correct.
I will get into this tonight!
#6 by Jack Sleight on October 5, 2007 - 11:59 am
Quote
Yes, same problem:
$imagick = new Imagick(‘E:\Server\sandbox\test.bmp’); = unable to open image `E:E:\Server\sandbox\test.bmp’
#7 by Mikko Koppanen on October 5, 2007 - 5:16 pm
Quote
I am unable to reproduce this issue.
#8 by Jack Sleight on October 5, 2007 - 5:35 pm
Quote
Hmmm, well I don’t really know what to say, it 100% doesn’t work for me. It’s certainly not PHP’s fault, because things like file_get_contents, is_file and is_readable all work on exactly the same path. Is there any debug output/log I can send you?
I’m running PHP 5.2.4, Apache 2.2.3, “ImageMagick-6.3.6-0-Q8-windows-dll.exe”, with the dynamic Q8 version of your dll.
#9 by Mikko Koppanen on October 5, 2007 - 5:40 pm
Quote
Does the same thing happen with all image formats ?
#10 by Jack Sleight on October 5, 2007 - 5:57 pm
Quote
Yes. Although what’s odd is that if I have a file called “TeSt.JpG”, and I have the line “$imagick = new Imagick(‘test.jpg’);”, it does seem to resolve the file name, because the error has the correct name: “unable to open image `E:E:\Server\sandbox\TeSt.JpG’”.
#11 by Mikko Koppanen on October 5, 2007 - 6:08 pm
Quote
Well, here’s a longshot. Does it happen with other drive letters than E: ?
#12 by Jack Sleight on October 5, 2007 - 6:32 pm
Quote
I’m afraid so, but there’s some new funky weirdness:
unable to open image `C:E:\TeSt.JpG’:
Now the file is located at “C:\TeSt.JpG”, and the test script is located at “E:\Server\sandbox\test.php”. And the script is calling “$imagick = new Imagick(‘c:\test.jpg’);”.
#13 by Mikko Koppanen on October 5, 2007 - 6:41 pm
Quote
Well, youre right! That really sounds odd.. I don’t really get where that E: comes from.
#14 by Lars van den Noort on October 10, 2007 - 2:32 am
Quote
Hi Mikko,
I’m new to PHP+imagick programming and have found your website to be very helpfull. Thank you so much and keep up the good work!
I would like to report that I’m experiencing a similar thing as Jack is. I’m generating an image from scratch but when saving it to disk in PNG format PHP reports an error with the mysterious ‘E:’, this happens when using your php_imagick_5_2_4_dyn-Q16.dll file, ImageMagick 6.3.6 Q16 installed. The dll that comes with PHP5.2.4 doesn’t have this problem. I’m running WinXP SP2 Apache 2.0.59.
And a request
Could you write a small tutorial on how to work with QueryFontMetrics? I need to get the width/height of a string and setGravity is not up for what I’m trying to achieve. All that I get are errors, even when using code people have put on the web:
$im = new imagick();
$im->newPseudoImage(1024, 768, “gradient:#BEFFFF-#BE71F9″ );
$im->setImageFormat(‘png’);
($x_ppem, $y_ppem, $ascender, $descender, $width, $height, $max_advance) =
$im->QueryFontMetrics(
pointsize => 60,
text => ‘Hello World’,
StrokeWidth => 2,
Stroke => ‘black’
);
When I run this PHP reports:
Parse error: syntax error, unexpected ‘,’ in file x.php on line x. Any clues? Or a tutorial?
#15 by Mikko Koppanen on October 10, 2007 - 10:11 am
Quote
Hello Lars,
have you taken a look at this post already: http://valokuva.org/?p=17 ?
I will start investigating the “E:” issue today.
#16 by Cully Paterson on October 20, 2007 - 3:49 am
Quote
Hi Mikko,
The issue with drive letters showing up twice seems to be the same issue that was found with compiling Magickwand on Windows. Dirk solved this problem by reintroducing a section of code that had been taken out since a previous version. http://www.dirk.sh/dirk/magickwand/ .
He has posted the solution on the above site in the file ‘magickwand.c.dirk_patch’. Obviously this isn’t going to be an instant fix for Imagick, but it should give you a hint as to what/where to look.
Hope that helps.
Cully
#17 by Mikko Koppanen on October 20, 2007 - 10:11 am
Quote
Thanks Cully,
we were able to fix the issue earlier. It was a silly mistake in the code
#18 by Cully Paterson on October 20, 2007 - 10:26 pm
Quote
Fantastic – any idea when a new Windows build will be available to test?
Cheers
Cully
#19 by Mikko Koppanen on October 21, 2007 - 2:19 am
Quote
The builds shown here http://valokuva.org/?page_id=50 should work.
#20 by Nikolaus Kühn on October 15, 2009 - 1:51 am
Quote
Hello Mikko & everyone,
first of all thanks a lot for all the code and support. I would be helpful if anyone here could help me find the easiest and error-free way of exchanging the Q16 Version of imagick that comes in our Linux Ubuntu (apt-get install php5-imagick) systems with the appropriate Q8 Version. (We’re having performance problems and don’t need the extra precision).
Thanks & all the best,
Nikolaus
#21 by Mikko Koppanen on October 15, 2009 - 3:28 am
Quote
@Nikolaus,
Remove the php5-imagick package and execute the following commands:
Compile ImageMagick –with-quantum-depth=8 –prefix=/opt/imagemagick-q8, get imagick sources, phpize && ./configure –with-imagick=/opt/imagemagick-q8 && make && make install
You should test it first before doing it on live.
#22 by Ankit Kesharwani on March 30, 2012 - 11:27 am
Quote
Hi Mikko,
I am new user for imagick. Can you please explain from the scratch, how to insatall it on my system & what dll files do i need to install which supports PHP 5.3.6 version, as I have the same version on my PC.
Thanks in advance.
Ankit<