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

image alignment corrupts 32bit images #18

Closed
eyaler opened this issue Aug 30, 2019 · 2 comments
Closed

image alignment corrupts 32bit images #18

eyaler opened this issue Aug 30, 2019 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@eyaler
Copy link

eyaler commented Aug 30, 2019

when a padding is needed, the code in face_alignment will corrupt images with an alpha channel. fixed by:

img = PIL.Image.open(src_file).convert('RGBA').convert('RGB')

@pbaylies
Copy link
Owner

@eyaler Thanks; I've seen this happen before. Feel free to submit a patch, or point me in the right direction, otherwise, I might track it down eventually...

@eyaler
Copy link
Author

eyaler commented Aug 30, 2019

thanks. its just the above. in face_alignment.py replace:
img = PIL.Image.open(src_file)
with:
img = PIL.Image.open(src_file).convert('RGBA').convert('RGB')
this should also take care of your 'alpha' option

@pbaylies pbaylies added bug Something isn't working good first issue Good for newcomers labels Oct 11, 2019
pbaylies added a commit that referenced this issue Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants