[Chennaipy] Chennaipy - Monday Module - 30 Jan 2023

selvi dct selvi.dct at gmail.com
Mon Jan 30 12:51:26 EST 2023


Date: 30 Jan 2023


Module : ExifRead


Installation : pip install ExifRead


About:

Easy to use Python module to extract Exif metadata from digital image files.

Supported formats: TIFF, JPEG, PNG, Webp, HEIC.


Source Code:

from os import path

import exifread

path_name = r'C:\Users\Desktop\sss.jpg'

filename = open(path_name, 'rb')

tags = exifread.process_file(filename)

print(tags)


Output:

{'EXIF ApertureValue': (0x9202) Ratio=45/8 @ 644,

 'EXIF ColorSpace': (0xA001) Short=sRGB @ 452,

 'EXIF ComponentsConfiguration': (0x9101) Undefined=YCbCr @ 308,

 'EXIF CustomRendered': (0xA401) Short=Normal @ 536,

 ....

 'Image Orientation': (0x0112) Short=Horizontal (normal) @ 42,

 'Image ResolutionUnit': (0x0128) Short=Pixels/Inch @ 78,

 'Image Software': (0x0131) ASCII=GIMP 2.4.5 @ 182,

 'Image XResolution': (0x011A) Ratio=72 @ 166,

 'Image YResolution': (0x011B) Ratio=72 @ 174,

 'Interoperability InteroperabilityIndex': (0x0001) ASCII=R98 @ 958,

 'Interoperability InteroperabilityVersion': (0x0002) Undefined=[48, 49,
48, 48] @ 970,

 'Thumbnail Compression': (0x0103) Short=JPEG (old-style) @ 1006,

 'Thumbnail ResolutionUnit': (0x0128) Short=Pixels/Inch @ 1042,

 'Thumbnail XResolution': (0x011A) Ratio=72 @ 1074,

 'Thumbnail YResolution': (0x011B) Ratio=72 @ 1082}


Reference:

https://pypi.org/project/ExifRead/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/chennaipy/attachments/20230130/5e4f0689/attachment.html>


More information about the Chennaipy mailing list