Menu

#44 Caching result of PNG filter

open
nobody
None
5
2015-05-21
2015-05-21
psycho
No

Currently OptiPNG(Yes, 0.7.5 release) performs PNG delta filtering(specified by -f option) every iteration. It's just libpng's limitation; In optim.c it just call png_write_png() for writing PNG data, which is high-level API for writing PNG data stream, and it's impossible to interfere with any operation it really does.

I dig into png_write_png() in libpng, then I found which function is perform compression using zlib - png_write_filtered_row().

png_write_png()
-> png_write_image()
-> png_write_find_filter()
-> png_write_filtered_row()

png_write_filter() performs delta filtering and call png_write_filtered_row() to write compressed data. Thus, for caching filtered image data, it's requierd for implement optipng-own above function chains that doing needed operation for calling png_write_filtered_row() and call it independently (at least).

Can anyone do this work? Sorry about that, but it's too time consuming work for me - Currently I don't know about OptiPNG's data structures and logic and it takes some time to understand, and I'm not expert at C - and I have no time for now... I just write this ticket for preserving one of idea can resolve this feature request. Thanks for reading!

Discussion


Log in to post a comment.

MongoDB Logo MongoDB