Shrink your graphics tip

scorelessmusicscorelessmusic Member Posts: 565
Hi all,

I just thought to post this handy tip on how to make your graphic files as tiny as possible to minimize your memory footprint.

You don't even need to download any software. Just use this website to make your PNGs puny. It really works well!

http://www.gracepointafterfive.com/punypng/

Hope this helps someone out there doing everything him/herself, like me.

Comments

  • TobyToby Member Posts: 478
    That is really awesome, managed to save between 5% to 40% off almost all my images, and I thought it was as small as it could possibly go using Fireworks.

    Process your whole image library and see what the total saving is, It's likely to be big!

    Great post, thanks.

    EDIT# Amazing look at the processed file compared to the original in TextEdit and see how bloated the PNG files are with 'junk' code. Again amazing!
  • TobyToby Member Posts: 478
    After processing all my game images I managed to save 600k, so that makes it definitely worth doing when you need as much space as possible.

    I can see no difference in the graphics quality, I guess the code is just packed better and has no bloat!
  • zombotszombots Member Posts: 186
    yea i agree, its awesome. there is no visible difference in the image
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Very nice find scorelessmusic. I've added it to the FAQ.

    http://gamesalad.com/wiki/faqs:game_elements#what_can_i_do_to_save_memory_on_images
  • design219design219 Member Posts: 2,273
    Doesn't Apple do some sort of recompressing to PNGs when they do their bit for the iPhone app? Is anybody sure there will not be a conflict there?
  • butterbeanbutterbean Member Posts: 4,315
    Wow this is awesome! Has saved me a good amount of memory so far! Now if we can find one for music files, we'd be in 7th heaven! :)
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Is there a way to do this to images already in an actor that is placed in a scene or do I need to process the images and reload them into GS?
  • butterbeanbutterbean Member Posts: 4,315
    I believe you need to process the images, and remove the old ones, and upload the newer ones.... unless someone else has done this another way?
  • TheTTheT Member Posts: 80
    He, yeah I agree, great find. So you are sure it doesn't mess with transparency too much ? Cause I read something about dirty transparency on their site ? Don't know exactly what that is, but I guess it would be a less detailed alpha channel (if trans. matters and you have big images, maybe the images shouldn't be used with this tool ?) ?
  • CorellaCorella Member Posts: 37
    I'm not sure what that service does to transparency, but I have been using http://www.amake.us/software/pngcrusher/ for a while now, and have not seen any major issues.
    I make it a habit to always run any png image I churn out through one of these processes, it really does reduce the bloat, and a few k shaved off here and there really add up!

    (Just noticed that puny seems to do a better job than opti, but I guess a downloaded app is useful for those not always on the net)
  • eric_summerseric_summers Member Posts: 26
    Apple uses a modified version pngcrusher automatically on standalone png files in an Xcode projects resources. There is a good chance that it doesn't work with gamesalad. It is better to crush your pngs yourself. Apple's version will strip off the png headers (so it probably will not work in the gamesalad ide). Download it from amake.us. It works great.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I just played around with pngcrusher and it lowered the file size a bit on most of my png files. Then I tried going into photoshop and saving one of my png files that I use as a background (no trans) as a jpg (compression setting at "high") and it cut the file size by 1/5! When I open the jpg and the png version in preview I cannot detect any difference in quality at all. Should I use the jpg for backgrounds that don't need transparency or should I stick with the png because it is the preferred file type of the iphone? Any problem with using jpgs?
  • MankoManko Member Posts: 20
    Great tip, but I was only able to save 1kb (average) per picture. I guess photoshop "save to web" does a good job. :)
  • eric_summerseric_summers Member Posts: 26
    if you use pngcrusher, check out the command line options. If you play with them, you can get the file about 10% smaller then with the default options.
  • JackBQuickJackBQuick Member Posts: 524
    For those people interested in the theory behind how PNGs are optimized, there are two good articles over at Smashing Magazine:

    http://www.smashingmagazine.com/2009/07/15/clever-png-optimization-techniques/

    and

    http://www.smashingmagazine.com/2009/07/25/png-optimization-guide-more-clever-techniques/

    (They are a little bit technical but I found them fascinating.)
  • ZillaZilla Member Posts: 157
    Saved me between 7%-15%.

    You can also try the free Photoshop plug-in SuperPNG:
    http://www.fnordware.com/superpng/

    "It is faster than Adobe's own PNG plug-in and saves considerably smaller PNGs."
  • synthesissynthesis Member Posts: 1,693
    Sounds like a lot of damn work to save 10-20kb
    My full screen images at 8 Bit from a web export of Photoshop are running about 50-80 kb. I can live with that.

    My 960x640px scene maps are around 300-400 kb. So far...not much drag on the game. Bad rules cause more damage than fat graphics.
  • JGary321JGary321 Member Posts: 1,246
    /agree

    Thanks for the tip though. Sometimes 10-20kb per image can add up if you need just a bit more room to stay under 20mb.
Sign In or Register to comment.