Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mat2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jvoisin
mat2
Commits
75c0a750
Commit
75c0a750
authored
9 months ago
by
matiargs
Committed by
jvoisin
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Keep orientation metadata
parent
a47ac01e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!115
Keep orientation metadata
Pipeline
#238606
failed
7 months ago
Stage: linting
Stage: test
Changes
5
Pipelines
9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
CHANGELOG.md
+3
-0
3 additions, 0 deletions
CHANGELOG.md
libmat2/images.py
+3
-2
3 additions, 2 deletions
libmat2/images.py
pyproject.toml
+1
-1
1 addition, 1 deletion
pyproject.toml
setup.py
+1
-1
1 addition, 1 deletion
setup.py
tests/test_lightweight_cleaning.py
+0
-1
0 additions, 1 deletion
tests/test_lightweight_cleaning.py
with
8 additions
and
5 deletions
CHANGELOG.md
+
3
−
0
View file @
75c0a750
# 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
...
...
This diff is collapsed.
Click to expand it.
libmat2/images.py
+
3
−
2
View file @
75c0a750
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
+
1
−
1
View file @
75c0a750
[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"
}
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
75c0a750
...
...
@@ -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
"
,
...
...
This diff is collapsed.
Click to expand it.
tests/test_lightweight_cleaning.py
+
0
−
1
View file @
75c0a750
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment