Command line problem in $MS Windows (identify -format)

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
sinasalek

Command line problem in $MS Windows (identify -format)

Post by sinasalek »

Hi,
I had a problem with using imagemagick command line in windows.
So i searched a lot on the internet specially in magick-bug but i couldn't find any solution.
even Youssef solution didn't help (also you can read the problem details in this thread) :

http://studio.imagemagick.org/pipermail ... 01257.html

finally i accidentally came up with a solution, and here is the berief description of the problem :
try to use this command and you will see that it only prints "h" :

identify -format "%w %h" file.jpg

it's because windows recognize %w or %w% as a command line variables so will replace it with its value, and as long as it's not defined windows replace it with nothing!!

the solution is to using two percent sign like %%w. so below command will give correct result

identify -format "%%w %%h" file.jpg

hope it helps someone ;)

PS : i wish if imagemagick lead developers could use trac.edgewall.org as bug tracking system. it's a lot easier to assign bugs and search through previous bugs.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Command line problem in $MS Windows (identify -format)

Post by magick »

We have looked at Trac, Jira, and Bugzilla. We have not launched a solution just yet due to lack of time/interest.
sinasalek

Re: Command line problem in $MS Windows (identify -format)

Post by sinasalek »

magick wrote:We have looked at Trac, Jira, and Bugzilla. We have not launched a solution just yet due to lack of time/interest.
Glad to hear that. ;)
Post Reply