diff options
Diffstat (limited to 'libmat2')
| -rw-r--r-- | libmat2/images.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libmat2/images.py b/libmat2/images.py index 254438b..bca1e74 100644 --- a/libmat2/images.py +++ b/libmat2/images.py | |||
| @@ -116,6 +116,7 @@ class GdkPixbufAbstractParser(exiftool.ExiftoolParser): | |||
| 116 | 116 | ||
| 117 | _, extension = os.path.splitext(self.filename) | 117 | _, extension = os.path.splitext(self.filename) |
| 118 | pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.filename) | 118 | pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.filename) |
| 119 | pixbuf = GdkPixbuf.Pixbuf.apply_embedded_orientation(pixbuf) | ||
| 119 | if extension.lower() == '.jpg': | 120 | if extension.lower() == '.jpg': |
| 120 | extension = '.jpeg' # gdk is picky | 121 | extension = '.jpeg' # gdk is picky |
| 121 | elif extension.lower() == '.tif': | 122 | elif extension.lower() == '.tif': |
| @@ -138,7 +139,7 @@ class JPGParser(GdkPixbufAbstractParser): | |||
| 138 | 'MIMEType', 'ImageWidth', 'ImageSize', 'BitsPerSample', | 139 | 'MIMEType', 'ImageWidth', 'ImageSize', 'BitsPerSample', |
| 139 | 'ColorComponents', 'EncodingProcess', 'JFIFVersion', | 140 | 'ColorComponents', 'EncodingProcess', 'JFIFVersion', |
| 140 | 'ResolutionUnit', 'XResolution', 'YCbCrSubSampling', | 141 | 'ResolutionUnit', 'XResolution', 'YCbCrSubSampling', |
| 141 | 'YResolution', 'Megapixels', 'ImageHeight'} | 142 | 'YResolution', 'Megapixels', 'ImageHeight', 'Orientation'} |
| 142 | 143 | ||
| 143 | 144 | ||
| 144 | class TiffParser(GdkPixbufAbstractParser): | 145 | class TiffParser(GdkPixbufAbstractParser): |
| @@ -152,7 +153,7 @@ class TiffParser(GdkPixbufAbstractParser): | |||
| 152 | 'FileInodeChangeDate', 'FileModifyDate', 'FileName', | 153 | 'FileInodeChangeDate', 'FileModifyDate', 'FileName', |
| 153 | 'FilePermissions', 'FileSize', 'FileType', | 154 | 'FilePermissions', 'FileSize', 'FileType', |
| 154 | 'FileTypeExtension', 'ImageHeight', 'ImageSize', | 155 | 'FileTypeExtension', 'ImageHeight', 'ImageSize', |
| 155 | 'ImageWidth', 'MIMEType', 'Megapixels', 'SourceFile'} | 156 | 'ImageWidth', 'MIMEType', 'Megapixels', 'SourceFile', 'Orientation'} |
| 156 | 157 | ||
| 157 | 158 | ||
| 158 | class PPMParser(abstract.AbstractParser): | 159 | class PPMParser(abstract.AbstractParser): |
