change hachoir metadata extractor to best data extraction quality

This commit is contained in:
Prinz23 2024-11-20 07:54:42 +01:00 committed by JackDandy
parent 695f9c2201
commit c4289ae091

View file

@ -364,6 +364,7 @@ class Quality(object):
from hachoir.parser import createParser from hachoir.parser import createParser
from hachoir.metadata import extractMetadata from hachoir.metadata import extractMetadata
from hachoir.metadata.metadata_item import QUALITY_BEST
from hachoir.stream import InputStreamError from hachoir.stream import InputStreamError
parser = height = width = None parser = height = width = None
@ -383,7 +384,7 @@ class Quality(object):
parser.parse_exif = False parser.parse_exif = False
parser.parse_photoshop_content = False parser.parse_photoshop_content = False
parser.parse_comments = False parser.parse_comments = False
extract = extractMetadata(parser, **args) extract = extractMetadata(parser, quality=QUALITY_BEST, **args)
except (BaseException, Exception) as e: except (BaseException, Exception) as e:
logger.warning(msg % (filename, ex(e))) logger.warning(msg % (filename, ex(e)))
if extract: if extract: