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

Jpeg files decrease in quality #2

Open
TheHardew opened this issue Jun 15, 2023 · 2 comments
Open

Jpeg files decrease in quality #2

TheHardew opened this issue Jun 15, 2023 · 2 comments

Comments

@TheHardew
Copy link

It seems like the process of writing the jpeg file to the new zip files makes it reduce in quality and sometimes get corrupted?

Test epub:
rust.zip

Rename it to rust.epub, github does not allow epub files

Before conversion it's 15.4 MiB, after it's only 2.11 MiB

@TheHardew
Copy link
Author

TheHardew commented Jun 15, 2023

out_zip.write(&buf)? for some reason writes only around 60-90 KiB at a time

@TheHardew
Copy link
Author

TheHardew commented Jun 15, 2023

I think it should be out_zip.write_all(&buf)? instead. That seems to work. But frankly I don't know rust.
Also, remember to change the styled content to write_all

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