Skip to content

Commit 41a7521

Browse files
authored
Merge pull request #4689 from radarhere/qt
Removed ImageQt workaround for earlier versions
2 parents 3bbcd7b + 52f251a commit 41a7521

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)