exif

Print the result of a Python def

Print the result of a Python def Question: I want to read the date and time of a image by using Pillow. And now I want to print the result of the def to be shure I got the Date and Time. But when I type print(defname) I just get some weird numbers as the …

Total answers: 4

How to extract exif data from a PNG photo?

How to extract exif data from a PNG photo? Question: I am on OSX, running python and trying to extra EXIF data from a large set of images in my library. I’ve been using Pillow so far with my JPG photos and it works like a charm. However, I stumbled on the first PNG photo …

Total answers: 1

Get EXIF Data from ImageField Django 2.0

Get EXIF Data from ImageField Django 2.0 Question: I’m on this task of extracting the exif data of a photo uploaded through DJANGO 2.1.2, Here’s my model.py UPDATED MODEL: class UploadedImage(models.Model): image = models.ImageField( “Uploaded image”, upload_to=scramble_uploaded_filename, height_field=’height’, width_field=’width’) uploaded_at = models.DateTimeField(default=timezone.now) width = models.PositiveIntegerField(editable = False) height = models.PositiveIntegerField(editable = False ) camera = …

Total answers: 2

Get date and time when photo was taken from EXIF data using PIL

Get date and time when photo was taken from EXIF data using PIL Question: I can get the EXIF data from an image using PIL, but how can I get the date and time that the photo was taken? Asked By: sashoalm || Source Answers: Found the answer eventually, the tag I needed was 36867: …

Total answers: 6

In Python, how do I read the exif data for an image?

In Python, how do I read the exif data for an image? Question: I’m using PIL. How do I turn the EXIF data of a picture into a dictionary? Asked By: TIMEX || Source Answers: You can use the _getexif() protected method of a PIL Image. import PIL.Image img = PIL.Image.open(‘img.jpg’) exif_data = img._getexif() This …

Total answers: 10

Resize image in Python without losing EXIF data

Resize image in Python without losing EXIF data Question: I need to resize jpg images with Python without losing the original image’s EXIF data (metadata about date taken, camera model etc.). All google searches about python and images point to the PIL library which I’m currently using, but doesn’t seem to be able to retain …

Total answers: 11