-
There is no PA to P function in Convert.c. I tried following the code but I must have missed something because I didn't see where this conversion happens. |
Beta Was this translation helpful? Give feedback.
Answered by
radarhere
Aug 16, 2022
Replies: 1 comment 1 reply
-
You are correct that PA is not directly converted to P in the C layer at the moment. When support is missing for a direct conversion, the Python layer instead converts first to the base mode, and then to the destination mode. Lines 1034 to 1040 in 87ecd01 So it goes PA to RGB, and then RGB to P. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Yay295
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You are correct that PA is not directly converted to P in the C layer at the moment. When support is missing for a direct conversion, the Python layer instead converts first to the base mode, and then to the destination mode.
Pillow/src/PIL/Image.py
Lines 1034 to 1040 in 87ecd01
So it goes PA to RGB, and then RGB to P.