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

Pillow for image conversion? #91

Open
Urufusan opened this issue Jan 2, 2024 · 4 comments
Open

Pillow for image conversion? #91

Urufusan opened this issue Jan 2, 2024 · 4 comments

Comments

@Urufusan
Copy link

Urufusan commented Jan 2, 2024

IMO, using ImageMagick is a bit of a hassle (e.g. setting up the permissions, having to install it on a fresh system (or just can't, because of an environment like SteamOS)).

Why can't Pillow be used for image conversion to pbm? I managed to create a working implementation in my fork. Could it be that Pillow was avoided because of the contribution rule that states that no big dependencies should be used?

Fixed typos*

@NaitLee
Copy link
Owner

NaitLee commented Jan 3, 2024

In the past Cat-Printer is designed to be portable so that one don't need to install anything from pip to use it.

ImageMagick is pre-installed on many systems, and installing it is simple in most cases.

Though, you are right, external deps are not everywhere. I thought to rewrite Cat-Printer so that it can work with pip, and further more optional deps like PIL will be acceptable. But the rewrite isn't going on for months, I'm not active coding these days.

I'd seek time to complete it, if I can. When that happens, we can implement things with optional PIL etc.

@Urufusan
Copy link
Author

Urufusan commented Jan 3, 2024

Perhaps we can use PIL in the current codebase as a fallback? Basically, the logic that checks for ImageMagick could fall back to using a tiny hack like this one, that's how I made a working library example in my fork.

@Urufusan
Copy link
Author

Urufusan commented Jan 3, 2024

I'd be happy to make a nicer patch and put it in a PR.

@NaitLee
Copy link
Owner

NaitLee commented Jan 3, 2024

Yes, you may do it :)

Probably I should update the contribution rule a bit... Any dependencies are ok as long as they are optional, and that's easy to do.

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