You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
putpalette has a rawmode argument which accepts "RGBA", allowing a palette with some transparent colors. Unfortunately getpalette does not have a similar argument.
In most but not all of the images I'm working with, the first two elements of the palette are both (0, 0, 0), with the first element corresponding to the transparent color (0, 0, 0, 0) and the second corresponding to (0, 0, 0, 255). I was able to figure this out through experimentation, but would prefer to be more precise, as I have a few images where this is not the case.
putpalette has a
rawmode
argument which accepts"RGBA"
, allowing a palette with some transparent colors. Unfortunately getpalette does not have a similar argument.In most but not all of the images I'm working with, the first two elements of the palette are both (0, 0, 0), with the first element corresponding to the transparent color (0, 0, 0, 0) and the second corresponding to (0, 0, 0, 255). I was able to figure this out through experimentation, but would prefer to be more precise, as I have a few images where this is not the case.
Current code:
Desired code:
The text was updated successfully, but these errors were encountered: