Reputation: 3
How can I create multiple sizes of a specific image easily? The linked question was the same as the one I have, If you do that, the bat file will close immediately and nothing will be done .. I created an svg file and dragged it to a bat file. ~ My environment ~ I have already installed Imagemagick. I'm using Windows 10.
I'm not very good at English so I use translation. I'm sorry if you feel bad ..
Upvotes: 0
Views: 204
Reputation: 5395
ImageMagick can write several files from a single command using the "-write" operation. This command will output 8 images with different sizes and different filenames...
magick input.png ^
( -clone 0 -resize 180x180! -write AppIconMask@3x~ipad.png ) ^
( -clone 0 -resize 180x180! -write AppIconMask@3x~iphone.png ) ^
( -clone 0 -resize 152x152! -write AppIconMask@2x~ipad.png ) ^
( -clone 0 -resize 120x120! -write AppIconMask@2x~iphone.png ) ^
( -clone 0 -resize 84x84! -write [email protected] ) ^
( -clone 0 -resize 80x80! -write [email protected] ) ^
( -clone 0 -resize 58x58! -write [email protected] ) ^
( -clone 0 -resize 40x40! -write [email protected] ) ^
null:
The command ends by writing the original input file to "null:", an IM built-in that means write it to nowhere.
If you have ImageMagick v6 use "convert" instead of "magick".
Upvotes: 1