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

evaluate png-like bitmap precoder #21

Open
zeromus opened this issue Jul 12, 2016 · 0 comments
Open

evaluate png-like bitmap precoder #21

zeromus opened this issue Jul 12, 2016 · 0 comments

Comments

@zeromus
Copy link
Owner

zeromus commented Jul 12, 2016

png has several precoders (most complex of which is 'paeth') which could be inspirational for compressing some sectors containing bitmaps. although come to think of it that paeth precoder needs some sense of bitmap pitch and that might be utterly impractical here. But we should be able to get mileage out of trying a few different bitplane configurations and seeing how well they compress.

But if you wanted to be really slick you could try various pitches, looking for the one that minimizes entropy from paeth's point of view, judging that to be the correct pitch. this would be a big job, but given that it's being applied a sector at a time, only a small range of pitches would need to be assessed (for instance, pitches of 4000 would not even fit in a sector; pitches of 2000 would not benefit much from the 2d precoding since it would really only be 2 lines. Therefore pitches between 2 and 1000 or so would be reasonable. This would be equivalent to trying to trial-compressing about 1000 45x45 pngs, or in other words, a single 450x450 png--not too bad, right?)

As mentioned in other tickets (#23), having a filesystem parser could help here with selecting the right precoder parameters to use by tracking sectors back to known media types.

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

1 participant