Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to read any exif data while exiftool shows it. #156

Open
shahidash opened this issue Jan 5, 2025 · 1 comment
Open

Not able to read any exif data while exiftool shows it. #156

shahidash opened this issue Jan 5, 2025 · 1 comment

Comments

@shahidash
Copy link

import pyexiv2
img = pyexiv2.Image("/Users/shahid/Desktop/test/andypassport2.jpeg")
data = img.read_exif()
print(data)

#{}

➜ exiftool andypassport2.jpeg
ExifTool Version Number : 13.10
File Name : andypassport2.jpeg
Directory : .
File Size : 140 kB
File Modification Date/Time : 2022:09:15 21:45:02+05:30
File Access Date/Time : 2025:01:05 22:55:14+05:30
File Inode Change Date/Time : 2025:01:05 22:55:13+05:30
File Permissions : -rw-r--r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
JFIF Version : 1.01
Resolution Unit : None
X Resolution : 1
Y Resolution : 1
Image Width : 1195
Image Height : 1600
Encoding Process : Progressive DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 1195x1600
Megapixels : 1.9
➜ test

@LeoHsiao1
Copy link
Owner

LeoHsiao1 commented Jan 6, 2025

Hi!
These lines that exiftool outputs are not necessarily exif metadata.
For example, File Size and File Modification Date/Time are metadata that exist in any file, regardless of the image.
You can execute exiftool.exe -g1 xx.jpg to view the grouped information.
You can execute exiftool.exe -exif:all xx.jpg to view only exif.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants