

But I’ve seen examples in a few APKs that prove otherwise: But, if done the right way, it shouldn’t be noticeable to the user, and can save a huge amount of space. Tools have a difficult time understanding human perceptual quality, and in some cases, small errors to a tool can look like huge errors to a human eye.

THIS is why you should handle this process manually. It’s worth noting though, that reducing the number of unique colors, we’re effectively applying a lossy encoding stage to our image. As such reducing the number of unique colors in the will reduce variation in adjacent pixels, decreasing the dynamic range of values that are spit out from filtering.Īs a result, the DEFLATE stage will find more duplicate values, and be able to compress better. See, the filtering stage of the PNG compression step is powered by how variant adjacent pixel colors are to each other. The reason for your focus here, is that reducing unique colors directly influences the compression potential at every other stage of the pipeline and tools can do the rest.
Lossy png compressor manual#
Now, if the above tools just aren’t working for you, or you’d like to adopt a more manual approach to improving some of your assets _before_ it gets tossed to one of the above tools, then it’s worth taking matters into your own hands.Įven though there’s a lot of things you could manually do, I suggest that you should only focus on reducing the number of unique colors in your image and then let a tool take it the rest of the way. The gist here, is that if you’ve got a lot of data coming through your application, you should have a PNG optimization tool in your upload / distribute pipeline, if only to keep the crazy at bay. It can decrease the PNG file-size by 5%, without impacting image quality in any form… sure it’s significantly slower, but it’s impressive that improvements can still be made to the old-school DEFLATE codec. It reduces PNG file size by providing a more efficient, and powerful deflate stage in the compressor, allowing it to find better matches in your data.
Lossy png compressor full#
The trick here, is that in the full spectrum of things a tool could do, each one of these tools does a subset of it So there’s no “best tool” for the job, so make sure you’re spending the time to evaluate which one works best for you, and then adopt the hell out of it.įWIW, A personal favorite of mine on that list has to be zopfliPNG. PNGQuant, ImageMagick, PNGGauntlet, PNGOut, PNGCrush, OptiPNG, CryoPNG, PNG Compressor, Yahoo, PNGOptimizer, PunyPNG, TinyPNG, PNGWolf, Advpng, DeflOpt, Defluff, Huffmix, TruePNG, PNGnq-s9, Median Cut Posterizer, scriptpng, pngslim, zopfliPNG (Which became the backbone of the famous Duke Nukem 3D engine.) Since then, there’s been a lot of new PNG optimizers that have hit the scene A quick google search will bring up a plethora of options for you to choose from: PNG optimization has been a common problem for a long time 20 years ago, Ken Silverman wrote one of the first popular PNG optimizers, PNGOUT. Once you understand the PNG file format, it becomes clear that there’s some obvious areas of improvement that could result in smaller file sizes:Īnd this isn’t new information. YMMV if your app is only used by robots, or small squirrels. These suggestions are based on things I’ve seen in real apps that real humans are using. So, now that I’ve trolled through about 100 APKs, I’ve decided to pass along my top suggestions on reducing PNG file size. So, it’s easy to assume that most of the PNGs out there just haven’t been given the love & care they deserve. The problem is that it’s pretty easy to make bloated PNG files heck, just adding two pixels to the width of your image could double its size. As such, it’s become the go-to for transparency-seeking developers for a few decades now. It’s got great quality control, and supports transparency. Lately, I’ve been noticing the growth of a frightening trend : Bloated PNG files.Īs I talked about last time, PNG is a pretty awesome, flexible image file format.
Lossy png compressor android#
One of the benefits of my role here at Google is that Iget to troll through a lot of Android applications, and look for common places where people might be able to improve their performance.
