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

Check type of image input #178

Open
Hammy27 opened this issue Dec 27, 2022 · 1 comment
Open

Check type of image input #178

Hammy27 opened this issue Dec 27, 2022 · 1 comment

Comments

@Hammy27
Copy link

Hammy27 commented Dec 27, 2022

Usecase: I use your wrapper for on the fly profile-picture processing (make a thumbnail of users face while at the same time making sure they only upload images with a face on it) in Django. I therefore pass the image as a numpy array.

Problem: If one does not provide the array as a PIL Image array colors are kind of inverted.

Solution: I post-process the resulting image with an inverse version of your gbr_to_rgb function.

Request: please check the type of the input array and let it decide if color-reversion has to be applied.

@fahriwps
Copy link

Usecase: I use your wrapper for on the fly profile-picture processing (make a thumbnail of users face while at the same time making sure they only upload images with a face on it) in Django. I therefore pass the image as a numpy array.

Problem: If one does not provide the array as a PIL Image array colors are kind of inverted.

Solution: I post-process the resulting image with an inverse version of your gbr_to_rgb function.

Request: please check the type of the input array and let it decide if color-reversion has to be applied.

could you provide more details about your solution? Did you convert image input in gbr_to_rgb function as PIL Image array before converting to RGB?

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