Skip to content

[FIX] RGB/RGBA image error#19

Open
sylvainc wants to merge 1 commit into
fvdsn:masterfrom
pywebdriver:fix-img-rgba
Open

[FIX] RGB/RGBA image error#19
sylvainc wants to merge 1 commit into
fvdsn:masterfrom
pywebdriver:fix-img-rgba

Conversation

@sylvainc

Copy link
Copy Markdown

If an image with only RGB channels (no alpha channel) is printed an "IndexError" expception is raised
because the index 3 is invalid for invalid for an image with only 3 channels like RGB image.
This fix merely used the information provided by the "mode" property of the PIL "Image" object.

If an image with only RGB channels (no alpha channel) is printed an "IndexError" expception is raised
because the index 3 is invalid for invalid for an image with only 3 channels like RGB image.
This fix merely used the information provided by the "mode" property of the PIL "Image" object.
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

Successfully merging this pull request may close these issues.

1 participant