Image which filename has unicode character does not convert

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jieves
Posts: 1
Joined: 2018-07-02T01:27:54-07:00
Authentication code: 1152

Image which filename has unicode character does not convert

Post by jieves »

I have images which filename start with an exclamation mark.
For example: !G2A01.jpg

When I try to convert such image I get following error :

Converting image: G2A01
convert: geometry does not contain image `\TEMP\FOTOS_VAN_SCANNER\sgroot\G2A01.jpg' @ warning/transform.c/ShaveImage/1626.

So, the image does not convert. In de console log, the exclamation is not shown.

I use version :

c/Program Files/ImageMagick-7.0.8-Q16/convert

Can someone please explain me how I can solve this problem ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image which filename has unicode character does not convert

Post by fmw42 »

In Unix on my Mac, putting an escape character in front works. Unix escapes are \. In Windows the escape character is ^.

So this works for me.

Code: Select all

convert \!G2A01.jpg tmp.png
I do not know if the same concept will work in Windows. Each OS has its own set of reserved characters.

Why would you use an ! to start a filename, anyway?
Post Reply