Keep orientation metadata
This commit is contained in:
parent
a47ac01eb6
commit
75c0a750c1
@ -1,3 +1,6 @@
|
||||
# 0.13.5 - 2023-08-02
|
||||
- Keep orientation metadata on jpeg and tiff files
|
||||
|
||||
# 0.13.4 - 2023-08-02
|
||||
|
||||
- Add documentation about mat2 on OSX
|
||||
|
@ -116,6 +116,7 @@ class GdkPixbufAbstractParser(exiftool.ExiftoolParser):
|
||||
|
||||
_, extension = os.path.splitext(self.filename)
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.filename)
|
||||
pixbuf = GdkPixbuf.Pixbuf.apply_embedded_orientation(pixbuf)
|
||||
if extension.lower() == '.jpg':
|
||||
extension = '.jpeg' # gdk is picky
|
||||
elif extension.lower() == '.tif':
|
||||
@ -138,7 +139,7 @@ class JPGParser(GdkPixbufAbstractParser):
|
||||
'MIMEType', 'ImageWidth', 'ImageSize', 'BitsPerSample',
|
||||
'ColorComponents', 'EncodingProcess', 'JFIFVersion',
|
||||
'ResolutionUnit', 'XResolution', 'YCbCrSubSampling',
|
||||
'YResolution', 'Megapixels', 'ImageHeight'}
|
||||
'YResolution', 'Megapixels', 'ImageHeight', 'Orientation'}
|
||||
|
||||
|
||||
class TiffParser(GdkPixbufAbstractParser):
|
||||
@ -152,7 +153,7 @@ class TiffParser(GdkPixbufAbstractParser):
|
||||
'FileInodeChangeDate', 'FileModifyDate', 'FileName',
|
||||
'FilePermissions', 'FileSize', 'FileType',
|
||||
'FileTypeExtension', 'ImageHeight', 'ImageSize',
|
||||
'ImageWidth', 'MIMEType', 'Megapixels', 'SourceFile'}
|
||||
'ImageWidth', 'MIMEType', 'Megapixels', 'SourceFile', 'Orientation'}
|
||||
|
||||
|
||||
class PPMParser(abstract.AbstractParser):
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "mat2"
|
||||
version = "0.13.4"
|
||||
version = "0.13.5"
|
||||
description = "mat2 is a metadata removal tool, supporting a wide range of commonly used file formats, written in python3: at its core, it's a library, used by an eponymous command-line interface, as well as several file manager extensions."
|
||||
readme = "README.md"
|
||||
license = {file = "LICENSE"}
|
||||
|
2
setup.py
2
setup.py
@ -5,7 +5,7 @@ with open("README.md", encoding='utf-8') as fh:
|
||||
|
||||
setuptools.setup(
|
||||
name="mat2",
|
||||
version='0.13.4',
|
||||
version='0.13.5',
|
||||
author="Julien (jvoisin) Voisin",
|
||||
author_email="julien.voisin+mat2@dustri.org",
|
||||
description="A handy tool to trash your metadata",
|
||||
|
@ -33,7 +33,6 @@ class TestLightWeightCleaning(unittest.TestCase):
|
||||
'parser': images.TiffParser,
|
||||
'meta': {'ImageDescription': 'OLYMPUS DIGITAL CAMERA '},
|
||||
'expected_meta': {
|
||||
'Orientation': 'Horizontal (normal)',
|
||||
'ResolutionUnit': 'inches',
|
||||
'XResolution': 72,
|
||||
'YResolution': 72
|
||||
|
Loading…
Reference in New Issue
Block a user