Merge pull request #7173 from radarhere/relative

This commit is contained in:
Hugo van Kemenade 2023-06-02 16:00:01 +03:00 committed by GitHub
commit 9a560c78a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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)

View File

@ -17,7 +17,7 @@ import subprocess
import sys
from shlex import quote
from PIL import Image
from . import Image
_viewers = []

View File

@ -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)