Author Topic: goofy batch image processing question  (Read 876 times)

this is going to be a nightmare to do manually so i'd be amazed if there were an existing method of doing this thing en-masse

ok so imagine you have this picture of a bulbasaur


it looks pretty great right it's scaled up from 96x96 to 192x192 with nearest neighbour great no problem; here's the thing: all of these sprites have the pokemon in the centre of the image. this doesn't sound like an issue, but allow me to demonstrate the problem here:


now i don't want any floating bulbasaurs so what i want to do is go through all of these sprites and make it so they retain their resolutions, but their lowest non-transparent pixel is at the lowest Y position. if there's not an existing solution, i can do a few things to work around this, but obviously doing this for hundreds of images is a major time sink.

edit:
realised another viable solution is to trim the image to its lowest possible resolution so that there's no empty space, but no part of the image is cut off probably
« Last Edit: December 27, 2014, 11:05:38 PM by otto-san »

Solved the problem. I used XnConvert to first automatically crop the image using the top-left colour (which would always be transparent), then resize the canvas from the bottom back to 192x192.

and this is how the mind of a coder is different
it's problem solving instead of spending hours doing it manually
even if it takes 3 hours to make a programmatic way to do this, it would still be preferred over 2 hours of manual work

i've been there too many times tonight mate

here's the end result for anyone interested



wip


now do it with the unevolved pokemon
they look so much better

here's a loop of randomly generated battles