How to convert a specific frame using a batch file
Posted: 2012-06-28T03:54:38-07:00
Hi All
Still new to IM but have been doing basic stuff so far - converting gif/bmd/png
This is using batch file on Win7 cmd.exe and IM 6.7.7-9.
I now have to convert *.ico to *.xpm which I can do fine one ico file at a time.
First identify to see which frame is 128x128
D:\>identify icon1.ico
icon1.ico[0] ICO 16x16 16x16+0+0 32-bit DirectClass 82.7KB 0.000u 0:00.002
icon1.ico[1] ICO 32x32 32x32+0+0 32-bit DirectClass 82.7KB 0.000u 0:00.015
icon1.ico[2] ICO 48x48 48x48+0+0 32-bit DirectClass 82.7KB 0.000u 0:00.022
icon1.ico[3] ICO 128x128 128x128+0+0 32-bit DirectClass 82.7KB 0.000u 0:00.032
Then use: convert icon1.ico[3] icon1.xpm
I would like to do this in the batch file as well and not sure how. Did a search on this board but have not found anything (that makes sense to me)
How can I get the correct frame when running the batch?
- Is there another option apart from 'identify' that I can use?
- Or is this something I should do via the batch to iterate through the identify results? If this is the case, any suggestions on how to do this?
Thanks!
Still new to IM but have been doing basic stuff so far - converting gif/bmd/png
This is using batch file on Win7 cmd.exe and IM 6.7.7-9.
I now have to convert *.ico to *.xpm which I can do fine one ico file at a time.
First identify to see which frame is 128x128
D:\>identify icon1.ico
icon1.ico[0] ICO 16x16 16x16+0+0 32-bit DirectClass 82.7KB 0.000u 0:00.002
icon1.ico[1] ICO 32x32 32x32+0+0 32-bit DirectClass 82.7KB 0.000u 0:00.015
icon1.ico[2] ICO 48x48 48x48+0+0 32-bit DirectClass 82.7KB 0.000u 0:00.022
icon1.ico[3] ICO 128x128 128x128+0+0 32-bit DirectClass 82.7KB 0.000u 0:00.032
Then use: convert icon1.ico[3] icon1.xpm
I would like to do this in the batch file as well and not sure how. Did a search on this board but have not found anything (that makes sense to me)
How can I get the correct frame when running the batch?
- Is there another option apart from 'identify' that I can use?
- Or is this something I should do via the batch to iterate through the identify results? If this is the case, any suggestions on how to do this?
Thanks!