Skip to content

Commit 3febd49

Browse files
committed
xobject/drawable: fix put_pil_image implementation
The deprecated `Image.tostring` method has been removed in Pillow>=3.0.
1 parent b0f3bf2 commit 3febd49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Xlib/xobject/drawable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def put_pil_image(self, gc, x, y, image, onerror = None):
249249
else:
250250
subimage = image
251251
w, h = subimage.size
252-
data = subimage.tostring("raw", rawmode, stride, 0)
252+
data = subimage.tobytes("raw", rawmode, stride, 0)
253253
self.put_image(gc, x, y, w, h, format, depth, 0, data)
254254
y1 = y1 + h
255255
y = y + h

0 commit comments

Comments
 (0)