Follow this Blog!

Nov 6, 2013

f Comment

[SOLVED] ImageMagick Fails on Images with UTF-8 File Name!

Amazon If you use ImageMagick to modify your images you may be wondering why the latest version of ImageMagick is NOT working on images with UTF-8 file name such as ็‰›่‚‰้บต.jpg. When I ran the command to resize images I got a strange error message and the command failed. The error message looks like the following.

$ mogrify -resize 200x200 *.jpg
mogrify.exe: unable to open image `??????.jpg': Invalid argument @ error/blob.c/OpenBlob/2514.
Magick: unable to open image `??????.jpg': Invalid argument @ error/blob.c/OpenBlob/2517.

I'll walk you through how to solve this issue.

Solution #1

The latest version at the time of the writing is ImageMagick-6.8.7-4-Q16-x64-dll.exe. It just does not work on images with UTF-8 file name. So let's rename these images to English characters; then we do whatever we need to do with ImageMagick; then we rename the images back to the original names.

If this is a chore to you the next solution is a lot better.

Solution #2

Install ImageMagick-5.5.7-Q8-windows-dll.exe which I have verified to work on images with UTF-8 file name. At least the command to resize images works. If you cannot find this executable on the Internet let me know and I will send the entire executable to you. It is 6249 KB which is about 6 MB.

The downside of course is that it may not have the features that other newer versions have.

Questions? Let me know!
Please leave a comment here!
One Minute Information - by Michael Wen
Find Michael on Facebook
ADVERTISING WITH US - Direct your advertising requests to Michael