mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Merge pull request #7173 from radarhere/relative
This commit is contained in:
commit
9a560c78a8
|
@ -22,11 +22,11 @@ import os
|
|||
import struct
|
||||
import sys
|
||||
|
||||
from PIL import Image, ImageFile, PngImagePlugin, features
|
||||
from . import Image, ImageFile, PngImagePlugin, features
|
||||
|
||||
enable_jpeg2k = features.check_codec("jpg_2000")
|
||||
if enable_jpeg2k:
|
||||
from PIL import Jpeg2KImagePlugin
|
||||
from . import Jpeg2KImagePlugin
|
||||
|
||||
MAGIC = b"icns"
|
||||
HEADERSIZE = 8
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
import sys
|
||||
from enum import IntEnum
|
||||
|
||||
from PIL import Image
|
||||
from . import Image
|
||||
|
||||
try:
|
||||
from PIL import _imagingcms
|
||||
from . import _imagingcms
|
||||
except ImportError as ex:
|
||||
# Allow error import for doc purposes, but error out when accessing
|
||||
# anything in core.
|
||||
|
@ -271,7 +271,7 @@ def get_display_profile(handle=None):
|
|||
if sys.platform != "win32":
|
||||
return None
|
||||
|
||||
from PIL import ImageWin
|
||||
from . import ImageWin
|
||||
|
||||
if isinstance(handle, ImageWin.HDC):
|
||||
profile = core.get_display_profile_win32(handle, 1)
|
||||
|
|
|
@ -17,7 +17,7 @@ import subprocess
|
|||
import sys
|
||||
from shlex import quote
|
||||
|
||||
from PIL import Image
|
||||
from . import Image
|
||||
|
||||
_viewers = []
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import os
|
|||
import struct
|
||||
import sys
|
||||
|
||||
from PIL import Image, ImageFile
|
||||
from . import Image, ImageFile
|
||||
|
||||
|
||||
def isInt(f):
|
||||
|
@ -191,7 +191,7 @@ class SpiderImageFile(ImageFile.ImageFile):
|
|||
|
||||
# returns a ImageTk.PhotoImage object, after rescaling to 0..255
|
||||
def tkPhotoImage(self):
|
||||
from PIL import ImageTk
|
||||
from . import ImageTk
|
||||
|
||||
return ImageTk.PhotoImage(self.convert2byte(), palette=256)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user