ianare / exif-py

Easy to use Python module to extract Exif metadata from digital image files.
BSD 3-Clause "New" or "Revised" License
831 stars 191 forks source link

Accessing EXIF MakerNote as bytes #194

Open astrorafael opened 7 months ago

astrorafael commented 7 months ago

Hi First of all, thank you so much for this very useful package.

I'm trying to process some RaspberryPi images and accesing some exclusive parameters as the analog gain. As this is not in an ordinary EXIF tag, the capture program (raspistill) stores some specific information in the EXIF MakerNote Tag and it is displayed as such in the EXIF.py utility

When trying to acess this tag like this

note = str(exif.get('EXIF MakerNote', None))
log.info("EXINF MakerNote  = %s",note)

EXIF MakerNote = [101, 118, 61, 45, 49, 32, 109, 108, 117, 120, 61, 45, 49, 32, 101, 120, 112, 61, 51, 52, ... ]

EXIF MakerNote = [101, 118, 61, 45, 49, 32, 109, 108, 117, 120, 61, 45, 49, 32, 101, 120, 112, 61, 51, 52, ... ]

But it doesn't return the whole bytes array

If you decode these first bytes, you get part of the information that I'm looking for

value =  bytes([101, 118, 61, 45, 49, 32, 109, 108, 117, 120, 61, 45, 49, 32, 101, 120, 112, 61, 51, 52,])
print(str(value))

b'ev=-1 mlux=-1 exp=34'

Is there any way to obtain the whole bytes array content with exifread?

Thank you so much in advance