Skip to content

Commit a5d5af1

Browse files
remove texture settings code
1 parent bd8435e commit a5d5af1

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

src/wmwpy/classes/texture.py

+26-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def __init__(
8585

8686
this.textureSettings = this._textureSettings.get(this.filename)
8787

88-
if this.textureSettings.premultiplyAlpha:
89-
this.image = this.image.convert('RGBa')
88+
# if not this.textureSettings.premultiplyAlpha:
89+
# this.image = this.image.convert('RGBa')
9090

9191
@property
9292
def size(this) -> tuple[int,int]:
@@ -115,3 +115,27 @@ def save(this, filename : str = None) -> File:
115115
file = this.filesystem.add(filename, fileio, replace = True)
116116

117117
return file
118+
119+
def show(self, *args, **kwargs):
120+
"""Calls the PIL.Image.Image.show() method.
121+
122+
---
123+
#### Description copied from the PIL library
124+
125+
Displays this image. This method is mainly intended for debugging purposes.
126+
127+
This method calls PIL.ImageShow.show internally. You can use
128+
PIL.ImageShow.register to override its default behavior.
129+
130+
The image is first saved to a temporary file. By default, it will be in PNG format.
131+
132+
On Unix, the image is then opened using the **display**, **eog** or **xv** utility, depending on which one can be found.
133+
134+
On macOS, the image is opened with the native Preview application.
135+
136+
On Windows, the image is opened with the standard PNG display utility.
137+
138+
Args:
139+
title (str | None, optional): Optional title to use for the image window, where possible.. Defaults to None.
140+
"""
141+
return self.image.show(*args, **kwargs)

0 commit comments

Comments
 (0)