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 output.
My code:
import os
import time
import shutil
import re
from PIL import Image, ExifTags
from PIL.ExifTags import TAGS
def get_date_taken(path):
return Image.open(r"E:\insert_folder\DSC_3389.jpg")._getexif()[36867]
print(get_date_taken)
One more thing... If you understand what I want to do and if you understand my code, could you pls check if there is any fault in my code? Thanks to you guys! <3