Image Optimization (PNG) Tools

Discussion in 'Useful Development Tools' started by Mrs_Allykat, Jun 19, 2019.

  1. Mrs_Allykat

    Mrs_Allykat Failsauce Veteran

    Messages:
    406
    Likes Received:
    1,879
    Location:
    Dixie Land
    First Language:
    English
    Primarily Uses:
    RMMV
    You’re making a game, and you know what platform you are aiming to release the game on. You wipe out all the audio for the other platform…. And your game is still too big? Whaa? How does that happen? You’ve even emptied out the unused animations from the database! I know I’ve asked myself, “just what is in this game anyway?”


    Well, your game, my game, and those folks over there too are in the same boat. Use overlays? Plugins? Parallax? It simply doesn’t matter, all of us have a collection of PNG images. Go ahead, right click on your “IMG” folder in one of your projects, and select properties. Check out the size of that thing! Obviously, getting rid of unused images will help, but what if there was something more you could do?

    Image_NonOptimized.png

    I wouldn’t have started writing this if there wasn’t. It’s time to optimize those images. The PNG format stores a variety of data, from headers and metadata to pallets that can all be tweaked. All of them can get some level of compression on them, and some can see as much as a 70% size reduction. So, the trick comes down to the tools.


    Google for PNG optimization, and you’ll get results for all the webmasters out there who use PNGs on their websites. There’s TinyPNG, OPtimizePNG, ezgif, and a host of others. Most of them have a daily and/or a monthly limit; then, they charge for it. (They then pay Google for a higher position on results pages to catch more hapless victims!) Not terribly useful for a game that has 400M of sprite-sheets, face images, and busts. We need a tool.

    Image_Optimized.png

    Luckily, there are several, and they’re free. I’ll list them below, but I use Psydk’s PngOPtimizer (actually the PortableApps version of it). All you have to do is get one, and then use the chosen app to reduce your filesizes. You will have to test your game before distributing it, because sometimes any of the optimization software can misinterpret data and introduce an error. However, most of the tools available will create a backup of the original (PngOptimizer creates a duplicate file with a leading underscore in the same directory).


    Once you’ve tested your game, delete the extra files. You will usually find about a 25 % - 33% total reduction in the size of your IMG directory. This is before any RAR or ZIP compression. Make sure to read the instructions for whichever optimizer you choose!


    Small List of PNG Optimizing Software





    NOTE: I will NOT link to any online optimizer services, as they are basically rip-offs.
     
    #1
    Parallax Panda likes this.
  2. ShadowDragon

    ShadowDragon Veteran Veteran

    Messages:
    391
    Likes Received:
    114
    Location:
    Netherlands
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    you miss Tinypng which is awesome tool, up to 20 images, max 5mb each and reduce to 70%, simply F5 and you can do it again
    over and overand i have it as well for photoshop to save time when saving the image, so a clean project really starts around 200-225MB
    instead of 300-350mb :D
     
    #2
  3. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,672
    Likes Received:
    690
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    quickest cheapest way to lighten a PNG, is to make it 8-bit palette.
    you can do that with whatever program.
     
    #3
  4. Mrs_Allykat

    Mrs_Allykat Failsauce Veteran

    Messages:
    406
    Likes Received:
    1,879
    Location:
    Dixie Land
    First Language:
    English
    Primarily Uses:
    RMMV
    A good call @gstv87! Still, that would involve loading every tile set, character sheet, and system image into GiMP (or paint.net, or photoshop), and re-saving. With PngOptimiser, we can simply drag a folder into the app-window, check if everything works, and then delete "_*.*" from the image directory.

    @ShadowDragon While I've used tinypng before, I feel that the limitation and F5 trick was not worth discussing since there are free apps that do the job nearly as well. With that said, I cannot fault the quality from tinypng, I don't think I've ever gotten a bad image from that site.
     
    #4
  5. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,164
    Likes Received:
    10,317
    First Language:
    English
    Primarily Uses:
    RMVXA
    I've done 50 or more at a time on tiny.ping and I've never been charged. I tend to do mine in batches as I go along, not save them up for a mammoth session at the end.
     
    #5
  6. ShadowDragon

    ShadowDragon Veteran Veteran

    Messages:
    391
    Likes Received:
    114
    Location:
    Netherlands
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    i love to use tiny png, but if you want to bulk the images over 20, than a small fee is paid, otherwise its free,
    the only cons i know of tiny png are gradiant colors than dont make it not nice as the view you made,
    even when using tinypng in photoshop when saving, same result, everything besides any gradient = topquality.

    but that is my opinion though. I dont know any other app as well and didn't know its name.
     
    #6
  7. Mrs_Allykat

    Mrs_Allykat Failsauce Veteran

    Messages:
    406
    Likes Received:
    1,879
    Location:
    Dixie Land
    First Language:
    English
    Primarily Uses:
    RMMV
    Definitely nothing wrong with TinyPNG, but having a local app has other benefits too. The main point though, is to remember to optimize the images. :D
     
    #7
  8. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,672
    Likes Received:
    690
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    yeah, but if you're a graphic artist, you already do that while designing your tileset.
    these tools are the last step, in case you want to compress them even more.
    you can already cut a big chunk of the load directly at design time.
     
    #8
    Mrs_Allykat likes this.
  9. Mrs_Allykat

    Mrs_Allykat Failsauce Veteran

    Messages:
    406
    Likes Received:
    1,879
    Location:
    Dixie Land
    First Language:
    English
    Primarily Uses:
    RMMV
    @gstv87 Very true. I just didn't see any threads on the subject, and we do get new people here every day. I thought it would be nice to have the subject mentioned.
     
    #9

Share This Page