Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE/C: After Running PNG Toolchain, Process IDAT via Zip ToolChain #6

Open
TPS opened this issue Jun 3, 2016 · 11 comments
Open

RFE/C: After Running PNG Toolchain, Process IDAT via Zip ToolChain #6

TPS opened this issue Jun 3, 2016 · 11 comments

Comments

@TPS
Copy link

TPS commented Jun 3, 2016

@javiergutierrezchamorro I was browsing @glennrp's repos recently, & I ran across the pngzop readme. IIUC, in a nutshell, pngzop is (was?) his effort to integrate zopfli compression directly into his pngcrush, bypassing zopflipng's own filter heuristics. In that method, pngzop would eventually dissect the PNG, pull the IDAT out, & process via zopfli (not zopflipng), & then reassemble. Better tool in #6 (comment)

Since FileOptimizer has a far better zip toolchain than just zopfli, maybe it'd be worth integrating the pngzop dissection-&-reassembly tools (&/or any others, at your preference) via a similar process into the PNG toolchain.

Thoughts/comments/interest?

@javiergutierrezchamorro
Copy link
Owner

I will try to do a Win32 and Win64 builds of 1.8.1, and try them.

@TPS
Copy link
Author

TPS commented Jun 25, 2016

I will try to do a Win32 and Win64 builds

@javiergutierrezchamorro I was searching for Windows builds of the various pngzop-specific tools (in the source tree as pngzop_*.c), & none seem to exist. Did you have any luck? If so & you'd like to post them someplace, I'd like to try them out manually to work out if it's worth converting the pngzop sh script to a cmd/batch, or maybe write my own.

@javiergutierrezchamorro
Copy link
Owner

Not yet. I have been quite busy with my real job lately, while FileOptimizer efforts have gone on the side of optional lossy recompression (JPEG and GIF), as well as adding more formats, and improving optimization ratio.

@TPS TPS changed the title Idea/RFC: After Running PNG Toolchain, Process IDAT via Zip ToolChain RFE/C: After Running PNG Toolchain, Process IDAT via Zip ToolChain Sep 4, 2016
@TPS
Copy link
Author

TPS commented Mar 16, 2018

@javiergutierrezchamorro: @MrKrzYch00 of Zopfli KrzYmod fame has made available krzydefc (README & binary @ GitHub or encode.ru) to convert ↔ {GZ, ZIP, ZLIB, PNG}, which is specifically designed to effect this kind of toolchain. Would you interested in taking a look?

(Pointed out in sayurin/optipng-zopfli#2 (comment) onwards.)

@javiergutierrezchamorro
Copy link
Owner

Thanks @TPS
According to what I saw it seems to be always compressing files inside a ZIP or GZ container.
So what would be the idea? Uncompress original ZIP/GZ, and then compress with Zopfli KrzYmod?

@TPS
Copy link
Author

TPS commented Mar 16, 2018

Nono, after running PNG through typical FO toolchain, convert to ZIP/GZ (whichever has better tools), run through FO as such, & then convert back. Or whatever permutation of that is optimal. krxyfefc isn't specific to only @MrKrzYch00's tools, I believe.

@TPS
Copy link
Author

TPS commented Oct 6, 2018

Similarly, after running APNG through its dedicated toolchain (mostly APNG Optimizer?), use APNG DisAssembler, run through PNG → ZIP toolchains (as detailed above), & then use APNG Assembler. Or vice versa, &c, in optimized order.

@javiergutierrezchamorro
Copy link
Owner

Similarly, after running APNG through its dedicated toolchain (mostly APNG Optimizer?), use APNG DisAssembler, run through PNG → ZIP toolchains (as detailed above), & then use APNG Assembler. Or vice versa, &c, in optimized order.

Not as easy because once APNG is disassembled, you are loosing the information of duration of each frame, and thus you will not be able to reconstruct again with the assembler.

@TPS
Copy link
Author

TPS commented Oct 7, 2018

Of course, 1 isn't (yet) deleting the original, right? So, that'd be used as the template to reassemble correctly.

@javiergutierrezchamorro
Copy link
Owner

Of course, 1 isn't (yet) deleting the original, right? So, that'd be used as the template to _re_assemble correctly.

Sure. But this will require implementing additional code on FO just to read and keep track of all frame information.

@TPS
Copy link
Author

TPS commented Oct 7, 2018

TweakPNG Command Line might be able to help w/ that, though (clearly) no longer maintained. I'll ask whether its command-line bits can be supported in mainline TweakPNG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants