Merge pull request #29 from corkborg/load-truncated-images
Allow images with broken headers to load.
This commit is contained in:
@@ -2,12 +2,15 @@ import sys
|
||||
|
||||
from typing import Generator, Iterable
|
||||
from tagger.interrogator.interrogator import AbsInterrogator
|
||||
from PIL import Image
|
||||
from PIL import Image, ImageFile
|
||||
from pathlib import Path
|
||||
import argparse
|
||||
|
||||
from tagger.interrogators import interrogators
|
||||
|
||||
# Allow images with broken headers to load
|
||||
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
group = parser.add_mutually_exclusive_group(required=True)
|
||||
|
||||
Reference in New Issue
Block a user