You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an application that dynamically generates PNGs.
I did some analysis of the types of images we create and found that for my test data, no filtering (PngFilterType.NONE) always resulted in the best file size. (If it helps, we are generating transparent images with relatively sparse content and few colors).
Knowing this, it seems I should be able to dramatically cut the processing time by instructing PngOptimizer to use a preferred approach.
I made a quick attempt yesterday and my microbenchmark showed I was able to speed up optimization by 6-7x for my case by specifying a filter and skipping adaptive filtering:
What do you think about this approach? In your mind does it make more sense for me to write my own variant of PngOptimizer more tailored to my use case?
thanks
Ian
The text was updated successfully, but these errors were encountered:
Nice! I know it's pretty much brute force right now, but by trying every filter you're sure you end up with the best one. I'm totally open to providing an option to override that if you need to optimize for speed.
Just fyi, I'm away on vacation for the next 10 days, but will be around after that.
Hi Ray,
I have an application that dynamically generates PNGs.
I did some analysis of the types of images we create and found that for my test data, no filtering (
PngFilterType.NONE
) always resulted in the best file size. (If it helps, we are generating transparent images with relatively sparse content and few colors).Knowing this, it seems I should be able to dramatically cut the processing time by instructing
PngOptimizer
to use a preferred approach.I made a quick attempt yesterday and my microbenchmark showed I was able to speed up optimization by 6-7x for my case by specifying a filter and skipping adaptive filtering:
ianpojman@efed346
What do you think about this approach? In your mind does it make more sense for me to write my own variant of PngOptimizer more tailored to my use case?
thanks
Ian
The text was updated successfully, but these errors were encountered: