Page 1 of 1

ImageMagickObject - 32 vs 64 bit

Posted: 2015-07-13T07:14:51-07:00
by spieler
There's been an ample amount of discussion lately for the ImageMagickObject (IMO) lately. Until recently, I've been in the same camp, but believe I now have a better understanding of how it is working.

Assuming this is being installed on a 64-bit system, the most important consideration is whether the of 32 or 64 bit version should be installed. Although the download page says "Unless you have a Windows 32-bit OS, we recommend this version of ImageMagick for 64-bit Windows," this is not sufficient enough information when using the IMO.

The version that needs to be installed is determined by the version of the software creating the IMO. If you are using VB6 which is 32-bit, you must install the 32-bit version. If you are developing a 64-bit application, then you must install the 64-bit version.

Here's a concrete example. If you install the 64-bit version and run the test scripts in "C:\Program Files\ImageMagick-6.9.1-Q8\ImageMagickObject\Tests" , it will work fine. If, however, you install the 32-bit version and run the test scripts (in the x86 directory), they fail. If you want the test scripts to run successfully, you need to run them with the 32-bit version of wscript "c:\windows\syswow64\wscript.exe" When you use that version, they run successfully.

From my testing, I believe that you can only have one version of the IMO installed at any given time. I haven't played with it too extensively, but I think if I install the 64-bit over the 32-bit, then my VB6 application stops working. I'm assuming it would be possible to have explicitly named 32 and 64 bit versions, so if you specified which version, you could have both versions installed and the non-specific one would just be the latest version installed. This is not something I deal with ever, so I do not know if that is even a good idea or if it goes against any/all best practices.

Gary

Re: ImageMagickObject - 32 vs 64 bit

Posted: 2015-12-28T21:30:27-07:00
by balmydrizzle
Actually, I've installed 32bit and 64bit IM dll versions on my Win7 64-bit PC and both my 32bit and 64bit PHP have IM extensions run well. My steps:
(Note1: I have {PHP 5.2.6 32bit+httpd 2.2 32bit} and {PHP 5.5.30 64bit+httpd 2.4 64bit} installed on my PC)
(Note2: I always copy php.ini into same folder with php.exe so that web and cli PHP can refer to same php.ini)

1. Install ImageMagick-6.5.5-5-Q16-windows-dll.exe.
2. Prefix all .exe files in installed folder with im32.
3. Install ImageMagick-6.9.2-10-Q16-x64-dll.exe.
4. Prefix all .exe files in installed folder with im64.
(Note3: Step 2 and 4 are only for me to run both versions well under command line mode)
5. Download php_imagick_dyn-Q16.dll(here). Copy it to ext subfolder in 32bit PHP installed folder.
6. Add 'extension=php_imagick_dyn-Q16.dll' in php.ini.
7. Download php_imagick-3.4.0rc4-5.5-ts-vc11-x64.zip(here). Open zip file and copy php_imagick.dll to ext subfolder in 64bit PHP installed folder.
8. Add 'extension=php_imagick.dll' in php.ini.
9. Start/Restart httpd 2.2 32bit and httpd 2.4 64bit.
10. Either write simple PHP script with <? phpinfo(); ?> and run it on web PHP or php -r "phpinfo();" > dump.txt to open dump.txt to see that imagemagick are installed well.

Re: ImageMagickObject - 32 vs 64 bit

Posted: 2016-03-27T02:18:07-07:00
by Illari
What are the differences between the 32 and 64 bit version? My pc is 64 bit so I should run 64bit version of image magick right?

Re: ImageMagickObject - 32 vs 64 bit

Posted: 2016-03-28T18:34:26-07:00
by markt
If you are running from command line on 64 bit version of windows then you can use either the 32 bit or 64 bit version of ImageMagick. The 64 bit version is probably the best option in this case.

If you are using the ImageMagickObject from VB, VBA, etc. then the choice of 32 bit or 64 bit is determined by the application calling the object.

Examples:
If you have 32 bit version of Excel on windows 64 bit from VBA then you need to use the 32 bit ImageMagickObject.

If you build a 64 bit VB application in visual studio then you need to use 64 bit ImageMagickObject.

From Vbscript on windows 64 bit, default 64 bit version of vbscript would run, then you need 64 bit ImageMagickObject. Similar for cscript.