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

Add a PyO3 wrapper? #214

Open
Gowee opened this issue Sep 9, 2023 · 1 comment
Open

Add a PyO3 wrapper? #214

Gowee opened this issue Sep 9, 2023 · 1 comment

Comments

@Gowee
Copy link

Gowee commented Sep 9, 2023

Hi!

I am downloading public domain books with their pages cut in tiles from various libraries for archive purpose. The process involves merging these tiles to reconstruct the pages then assembling them into a PDF. I hope the process to be automated considering the amount of books and pages are not trivial.

While exploring options for dezoomifying libraries in Python, I've observed that the existing solutions are not well-maintained. As an alternative, dezoomify-rs appears to be a more reliable choice. However, to use dezoomify-rs from python, I need to resort to subprocess calls, invoking the binary and managing I/O via the filesystems.

I would like to propose adding a simple PyO3 wrapper to integrate with Python. This wrapper would provide functions that accepts configs or URLs and inputs and returns dezoomified image data.

@lovasoa
Copy link
Owner

lovasoa commented Sep 9, 2023

Have you run into particular issues with the subprocess solution? I'd expect the cost of spawning a process to be tiny compared to the cost of downloading and assembling the tiles anyway... Isn't it ?

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