I have a working code:
StartApp(C:\ImageMagick\magick.exe composite -geometry +1358+403 "84114к.png" "841v8_3961_17.jpg" "841v8_3961_17.jpg")
It works like command line:
start C:\ImageMagick\magick.exe composite -geometry +1358+403 "84114к.png" "841v8_3961_17.jpg" "841v8_3961_17.jpg"
But now I have to get an information about image to the info.txt. I am trying to write something like this:
start C:\ImageMagick\magick.exe -format "%wx%h" >d:\info.txt d:\Image.jpg
The file d:\info.txt is overwritten, but there is no data.
Could anybody help me?
P.s. ImageMagick-7.0.7-Q16
How to get image's info through the starting the app?
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: How to get image's info through the starting the app?
With IM version 7 you need to put the input image near the beginning of your command so the command can read the image first, then do the various operations on it. Also, to output the information from "-format" you need to write it to the proprietary file format "info:". Try a command more like this...
Code: Select all
magick input.png -format "%wx%h" info: > d:\info.txt
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to get image's info through the starting the app?
As GeeMack says. Putting a redirection ">" in the middle of a command doesn't work.
GeeMacks solution can be simplified slightly, by writing directly to the text file:
GeeMacks solution can be simplified slightly, by writing directly to the text file:
Code: Select all
magick input.png -format "%wx%h" info:d:\info.txt
snibgo's IM pages: im.snibgo.com