tnc-ca-geo / animl-ingest

Lambda function for processing camera trap images
Other
0 stars 1 forks source link

Figure out if we should be using ExifImageWidth or ImageWidth tags #78

Closed nathanielrindlaub closed 6 months ago

nathanielrindlaub commented 9 months ago

Should we be using ExifImageWidth/Height or ImageWidth/Height tags to extract image dimensions from exif?? Bushnell doesn't appear to have ImageWidth/Height but Browning does?

nathanielrindlaub commented 6 months ago

Fixed (hopefully) by using ImageWidth/Height if present, else ExifImageWidth/Hight if present, else use sharp.metadata() to get the dimensions. I'm a little unsure if sharp.metadata() will work in the absence of ExifImageWidth/Height because it was hard to test, but I am optimistic.