Skip to content

Commit 689e870

Browse files
committed
Fix REXPaint loading example.
The boolean array was the wrong shape with an extra dimension along the color channels.
1 parent 7053a99 commit 689e870

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tcod/console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ def load_xp(path: Union[str, Path], order: Literal["C", "F"] = "C") -> Tuple[Con
13001300
13011301
# Apply REXPaint's alpha key color.
13021302
KEY_COLOR = (255, 0, 255)
1303-
is_transparent = console.rgb["bg"] == KEY_COLOR
1303+
is_transparent = (console.rgb["bg"] == KEY_COLOR).all(axis=-1)
13041304
console.rgba[is_transparent] = (ord(" "), (0,), (0,))
13051305
"""
13061306
if not os.path.exists(path):

0 commit comments

Comments
 (0)