Skip to content

Commit 52f251a

Browse files
committed
Removed workaround for earlier versions
1 parent 3bbcd7b commit 52f251a

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/PIL/ImageQt.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,7 @@ def _toqclass_helper(im):
142142
data = im.tobytes("raw", "BGRX")
143143
format = QImage.Format_RGB32
144144
elif im.mode == "RGBA":
145-
try:
146-
data = im.tobytes("raw", "BGRA")
147-
except SystemError:
148-
# workaround for earlier versions
149-
r, g, b, a = im.split()
150-
im = Image.merge("RGBA", (b, g, r, a))
145+
data = im.tobytes("raw", "BGRA")
151146
format = QImage.Format_ARGB32
152147
else:
153148
raise ValueError("unsupported image mode %r" % im.mode)

0 commit comments

Comments
 (0)