Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5956

Python Pillow getexif() doesn't find tif tag when ran from ubuntu container

$
0
0

I'm basically trying to get the values from a custom tif tag from an image, and I know the specific tag number I need.

with Image.open(BytesIO(imagebytes)) as im:    print(im.getexif().get(270))  # Specific tag number I need in this case

On my local Windows environment, the above code returns a string with some special metadata that I need to extract.

However when the code gets deployed to my kubernetes cluster, it just returns None. I'm kind of stuck wondering where all this metadata went to, does ubuntu distributions not support custom tif tags?

Some other notes:

  • Deployment uses Python (3.11.3) and PIL (9.5.0) versions are identical to my local setup
  • It's using the python:3.11.3 container, running on an eks cluster if that's relevant
  • The tif images are being pulled from s3, originally I thought it might be an issue with s3, however it works if I pull the images to my local windows setup.

I have also tried using a different module like tifffile however the results are the same. Works locally on Windows, but doesn't on the deployment.


Viewing all articles
Browse latest Browse all 5956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>