AlGrande AlGrande - 1 month ago 7
Java Question

Make an image power of 2

Do I need to make every image power of 2(Android) for better performance?
For example how could I make this: http://starbounder.org/mediawiki/images/1/18/Pixel_Hero_Set.png
picture po2 without stretching it?
My problem was that I wanted to keep the aspect ratio, and by stretching it to po2 it won't keep the aspect ratio. So to keep the aspect ratio and make it po2 I need to add transparent space to the image(in this case on the left and on the right handside) and I wanted to know if this decreases the performance.

Answer
  1. Use a photo editor such as pixlr
  2. Import the image (Open URL: http://starbounder.org/mediawiki/images/1/18/Pixel_Hero_Set.png)
  3. Click "Adjustment"
  4. Click "Resize"
  5. Change to a power of 2 such as "32" for width (Keep proportion, the width/height ratio works out such that the height is in a power of two as well)
  6. Save the new image

Otherwise, if you are in charge of the art, just make it in power of two to start with.

Comments