TinyPNG
RedRobo
Member, PRO Posts: 682
Hi,
Could someone explain what are the detrimental side effects of compressing .png's with something like Tinypng prior to building.
I've heard it's something that should not be done but don't understand why?
Many thanks.
Comments
@strag
From personal experience, programs like that tend to alter the image. I had transparent images in one of my games and I used a compressing software. When I returned to the game the transparent portions of the images became white. I assume that because it takes more memory to have a 24bit image than a 16bit image. The program decided to convert the 24bit image it to 16 bit or lower. Transparency does not work well at <24bit. But if you are using images without transparencies I think you may be fine.
Every since that day where I had to reload all my images I've stayed clear of any programs like that.
png images aren't 32 bit? 8 bits for each rgb and 8 bits for alpha? Is there anyway to make 24 bit images and have also transparency? So that GameSalad doesn't show white squares?
The goal of a tool like tinypng is to make the png file smaller on disk or smaller to download on a web page by palletizing the image so the description of each individual pixel is only a single byte that's used to look up the actual color. You can only have so many colors in the palette, so the process can be lossy depending on how many colors you use in your image.
The size of the image file on disk doesn't have anything to do with how much memory it takes to actually display it once it's decoded, so it doesn't have any benefit once the data is processed to display on a device.
tl;dr - You shouldn't use tinypng.
agree
A neat trick for saving on ROM size without the issue of GS having trouble processing your image is to use Photoshops Posterize Layer! even turning it down from 255 to 170 can save 30%+ on disk space with little visible effect on fidelity. Just save for web as a normal png and you'll be golden. Some images still look good even lower on the scale and can save even more disk space.
.
Follow us: Twitter - Website
Thanks everyone for the responses
@Alchimia Studios That's a great tip...thanks!
@GeorgeGS Thanks for explaining that so well, now it makes sense. I understand what you say about the size of the file on disk has nothing to do with the amount of memory it takes to display but I disagree that there is no benefit to compressing images. If I understand correctly...you could hugely reduce the size of your app which may be a factor in people uninstalling your game when their devices are getting full or may actually be a barrier to downloading for some people with a smaller memory device. I'm working on a game with 19 full-res background images so could cut the size of my app in half by compressing images.
That's true, if your images are stored in the same format in the published game. I'm not familiar enough with the publishing process to know if they are or not. I suppose you could try both ways and see if it makes a difference. Even if they aren't in the same format they may compress better, but that's pretty hard to predict.
@GeorgeGS