PNG size question
Hi all,
I have 1024x768 PNG images for the backgrounds in my game and the sizes vary from around 800kb to around 1800kb.
I was wondering what is the most likely factor in making one file so much bigger than another?
In their psd state they seem to have very little difference in the amount of layers.
I have 1024x768 PNG images for the backgrounds in my game and the sizes vary from around 800kb to around 1800kb.
I was wondering what is the most likely factor in making one file so much bigger than another?
In their psd state they seem to have very little difference in the amount of layers.
Comments
Hi @Fal01, as @jonmulcahy says, more colours means more size, in other words, by using Save for Web & Devices in Photoshop, saving as PNG24 will be about 3 times the file size of a PNG8... so you say you can't adjust the colours, which is fair enough, but some of your images might use 256 colours or less and so can be saved as PNG8 without any loss of quality. Note that the file sizes, whether PNG8 or PNG24 will still be a bit more than the file size shown from the file in your folder/desktop wherever; this is not too much more though and nothing to worry about, in the main.
Another thing to point out, there are some PNG optimisation programs about, where you can reduce the size of PNGs even further, (TinyPNG & ImageAlpha come to mind) but beware that sometimes GSC will make this the size before it was optimised anyway.... (so you need to replace the file in the Images folder in the package contents of the GSC file to get the benefit...)
So mainly I'd stick to saving PNGs in 8bit mode where possible, as I previously described; that alone will save up to two thirds of the file size.
A tip for you, btw, you can drag a psd file - with multiple layers or not - straight into GSC and it automatically will convert it to a PNG for you but the file size will be something like 10 times larger than even a PNG24 (I don't know why) so avoid doing this ever...
It turns out that the images which are predominantly green are the ones with larger file sizes, which is a bummer since my game is based in the forest!
So if they're predominantly green, it sounds like they are "ripe" to save as PNG8, as previously described, reducing the file size by two thirds!!
But remember, as @JSproject mentioned, you have to have your image size as 2048x1536 (for full backgrounds, or twice the size for smaller sizes) for iPad apps to take into account retina graphics.
It does mean importing, then opening package contents and changing the text file (very carefully) and replacing the png files with jpegs but it can be so worth it...
Good point from @darrelf about saving as jpeg to save a lot of file space although to point out, for those who don't know, this is only useful if your image doesn't need any transparency (which, OK, most background images don't!) but worth pointing out...
Great tip, i'll try that!
Hopefully after i've released my game. [-O<
Edit: just read @FryingBaconStudios comment... so extra good luck...
Disclaimer: Fal01 will not take any responsibility for any loss of earnings broken limbs or lack of libido experienced as a result of reading or acting on the (mis)information contained in this or any other thread featuring the afore mentioned.
Amen!
Dragging the entire images folder into image optim is a far more efficient method than what i've been doing for the last 3 hours.