1/31/14

I was working on making the Apple version of color golf, and it wants icons of different sizes.. I tried buying an app for making the different icons, but it didn't make all the ones I needed..

but then I remembered the command line, and ImageMagick..

I was also uploading some pictures for another post which are large, and I discovered "mogrify" (part of ImageMagick) for resizing a bunch of files in place:

> mogrify -resize 1024 2014-01-30*

..that resized all the pictures I took yesterday to be 1024 pixels wide, and however tall to keep the proportion..

and now to resize those images to all the dimensions I need.. which dimensions do I need?

57, 114, 72, 144, 120, 76, 152, 29, 58, 50, 100, 80, 40.. now to paste those numbers into javascript-eval and do:

var s = ''
_.each(input.match(/\d+/g), function (x) {
    s += 'convert icon512x512.png -resize ' + x + ' icon' + x + 'x' + x + '.png;'
})
s

getting:

convert icon512x512.png -resize 57 icon57x57.png;convert icon512x512.png -resize 114 icon114x114.png;convert icon512x512.png -resize 72 icon72x72.png;convert icon512x512.png -resize 144 icon144x144.png;convert icon512x512.png -resize 120 icon120x120.png;convert icon512x512.png -resize 76 icon76x76.png;convert icon512x512.png -resize 152 icon152x152.png;convert icon512x512.png -resize 29 icon29x29.png;convert icon512x512.png -resize 58 icon58x58.png;convert icon512x512.png -resize 50 icon50x50.png;convert icon512x512.png -resize 100 icon100x100.png;convert icon512x512.png -resize 80 icon80x80.png;convert icon512x512.png -resize 40 icon40x40.png;

..run that.. yay command line! (boo 99 cent app store app that didn't work)


No comments:

Post a Comment