ThatRozebudDude / FPS-Plus-Public

Other
117 stars 108 forks source link

Raise the flags for `oxipng` #82

Closed doggogit closed 3 months ago

doggogit commented 3 months ago

Basically, with oxipng, you can take shit to the extreme, unlike tinyPNG that's included in Free Texture Packer that shits itself when there's a huge ass spritesheet to optimize.

From personal testing and experience, cranking the -o flag to 6 and stripping with all instead of safe has no consequences and optimizes the image further.

biomseed commented 3 months ago

From personal testing and experience, cranking the -o flag to 6 and stripping with all instead of safe has no consequences and optimizes the image further.

That's just how png compression works. There can't be loss in the image itself. The only loss is the time it takes to compress. The smaller the size you want to compress to, the longer it will take. So technically, there was a consequence. Just not the kind of consequence that would need to be fixed. You probably just didn't know.

doggogit commented 3 months ago

From personal testing and experience, cranking the -o flag to 6 and stripping with all instead of safe has no consequences and optimizes the image further.

That's just how png compression works. There can't be loss in the image itself. The only loss is the time it takes to compress. The smaller the size you want to compress to, the longer it will take. So technically, there was a consequence. Just not the kind of consequence that would need to be fixed. You probably just didn't know.

I knew about the time "consequence" since I've also tried PNGGauntlet and that takes forever because there's 4 separate algorithms running to squeeze as much out of the image as possible.

Optimizing one image with oxipng doesn't take that much time, bulk optimizating does, as it should. But I get what you mean. :D

ThatRozebudDude commented 3 months ago

I think I'll leave the script how it is for now. I might update it in the future if I really want optimize everything as much as possible but there are diminishing returns for higher compression levels and I don't want to have this script running for 12 years at max compression.

doggogit commented 3 months ago

I think I'll leave the script how it is for now. I might update it in the future if I really want optimize everything as much as possible but there are diminishing returns for higher compression levels and I don't want to have this script running for 12 years at max compression.

Alright, it won't take that long, but for future reference, you can crank it to max