1/31/14

hm.. so here are the resolutions for the splash screens:

320 x 480, 640 x 960, 640 x 1136, 768 x 1024, 1536 x 2048, 1024 x 768, 2048 x 1536,

ok, now those are not the same aspect ratio, so I can't just make the biggest one and resize them.. also, the biggest one is bigger than the original version I made, so maybe I should remake it bigger? I could scale it up I suppose.. it would probably look crappy, but how many people would experience it? hm.. I think I'll redo it as a 2048x2048 square, and then we'll worry about the different aspect ratios.. I think ImageMagick probably has a thing for adding extra whitespace, hopefully..

ok, so I now have a 2048x2048 version of the splash:


..now let's see about this ImageMagick canvas resizing that I hope is possible..

stack overflow says something like:
convert input.jpg -gravity center -background white -extent 50x50 output.jpg

..let's try this:
convert splash2048x2048.png -resize 320 -gravity center -background black -extent 320x480 splash320x480.png

it worked!:

now to convert 320 x 480, 640 x 960, 640 x 1136, 768 x 1024, 1536 x 2048, 1024 x 768, 2048 x 1536 into a bunch of command lines using javascript-eval..

var s = ''
_.each(input.split(/, /), function (x) {
    var xy = _.map(x.split(/ x /), function (x) { return 1 * x })
    s += 'convert splash2048x2048.png -resize ' + Math.min(xy[0], xy[1]) + ' -gravity center -background black -extent ' + xy[0] + 'x' + xy[1] + ' splash' + xy[0] + 'x' + xy[1] + '.png;'
})
s

gives me:

convert splash2048x2048.png -resize 320 -gravity center -background black -extent 320x480 splash320x480.png;convert splash2048x2048.png -resize 640 -gravity center -background black -extent 640x960 splash640x960.png;convert splash2048x2048.png -resize 640 -gravity center -background black -extent 640x1136 splash640x1136.png;convert splash2048x2048.png -resize 768 -gravity center -background black -extent 768x1024 splash768x1024.png;convert splash2048x2048.png -resize 1536 -gravity center -background black -extent 1536x2048 splash1536x2048.png;convert splash2048x2048.png -resize 768 -gravity center -background black -extent 1024x768 splash1024x768.png;convert splash2048x2048.png -resize 1536 -gravity center -background black -extent 2048x1536 splash2048x1536.png;

..oh, it's so beautiful I want to cry! it even did the ridiculous landscape splash screen they seem to require:


now to upload those suckers..

No comments:

Post a Comment