File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 22
33from timezonefinder import TimezoneFinder
44
5+ from PIL import Image , TiffImagePlugin
56from .pillow_utils import register_raw_opener
67from pillow_heif import register_heif_opener
78
9+ # NOTE: calling Image.init() before register is crucial to import first
10+ # native plugins from pillow before the custom one.
11+ # Besides, there is not accept() function defined for raw_opener, which
12+ # does not check for any magic number (bytes prefix) for accept only certain
13+ # types of images.
14+ Image .init ()
815register_heif_opener ()
916register_raw_opener ()
1017
18+ if TiffImagePlugin .TiffImageFile .format in Image .ID :
19+ #NOTE: Tiff is accepting magic numbers from RAW photos. Should be the last in the chain.
20+ Image .ID .remove (TiffImagePlugin .TiffImageFile .format )
21+ Image .ID .append (TiffImagePlugin .TiffImageFile .format )
1122
1223class TigaserverApp (AppConfig ):
1324 name = "tigaserver_app"
You can’t perform that action at this time.
0 commit comments