mihonapp / mihon

Free and open source manga reader for Android
Apache License 2.0
9.84k stars 445 forks source link

Split jpeg images losslessly #907

Open TheHardew opened 4 months ago

TheHardew commented 4 months ago

Describe your suggested feature

Currently the "split tall images" option decodes the image and then recompresses that to a jpeg with quality 100. Recompressing a lossy image will degrade the quality and can increase the file size. Jpeg images can be split losslessly on the 8x8 block boundries. For example, jpegtran can do it. Please implement lossless file splitting for jpeg files.

I have not checked, but I imagine the "split wide images" option works similarly.

Other details

No response

Acknowledgements

foundObjects commented 2 months ago

This would be a really nice feature to have. It should also have the side effect of reducing computational load since you're not running a full jpeg compression for each of the split images.