File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,11 @@ def test_rgba_p() -> None:
107107 assert_image_similar (im , comparable , 20 )
108108
109109
110+ def test_pa () -> None :
111+ im = hopper ().convert ("PA" )
112+ assert im .palette .colors != {}
113+
114+
110115def test_rgba () -> None :
111116 with Image .open ("Tests/images/transparent.png" ) as im :
112117 assert im .mode == "RGBA"
Original file line number Diff line number Diff line change @@ -1143,7 +1143,7 @@ def convert_transparency(
11431143 raise ValueError (msg ) from e
11441144
11451145 new_im = self ._new (im )
1146- if mode == "P" and palette != Palette .ADAPTIVE :
1146+ if mode in ( "P" , "PA" ) and palette != Palette .ADAPTIVE :
11471147 from . import ImagePalette
11481148
11491149 new_im .palette = ImagePalette .ImagePalette ("RGB" , im .getpalette ("RGB" ))
You can’t perform that action at this time.
0 commit comments