mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Use getim()
This commit is contained in:
parent
5d430eab25
commit
9f409e823b
|
@ -176,15 +176,14 @@ class PhotoImage:
|
||||||
the bitmap image.
|
the bitmap image.
|
||||||
"""
|
"""
|
||||||
# convert to blittable
|
# convert to blittable
|
||||||
im.load()
|
ptr = im.getim()
|
||||||
image = im.im
|
image = im.im
|
||||||
if image.isblock() and im.mode == self.__mode:
|
if not image.isblock() or im.mode != self.__mode:
|
||||||
block = image
|
|
||||||
else:
|
|
||||||
block = Image.core.new_block(self.__mode, im.size)
|
block = Image.core.new_block(self.__mode, im.size)
|
||||||
image.convert2(block, image) # convert directly between buffers
|
image.convert2(block, image) # convert directly between buffers
|
||||||
|
ptr = block.ptr
|
||||||
|
|
||||||
_pyimagingtkcall("PyImagingPhoto", self.__photo, block.ptr)
|
_pyimagingtkcall("PyImagingPhoto", self.__photo, ptr)
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user