exif
This commit is contained in:
@@ -2,12 +2,13 @@ from exif import Image
|
|||||||
|
|
||||||
def info(file_name):
|
def info(file_name):
|
||||||
ret = f"Info: {file_name} - "
|
ret = f"Info: {file_name} - "
|
||||||
|
try:
|
||||||
with open(file_name, mode="rb") as file:
|
with open(file_name, mode="rb") as file:
|
||||||
img_bin = Image(file)
|
img_bin = Image(file)
|
||||||
dane = img_bin.get_all()
|
dane = img_bin.get_all()
|
||||||
ret += str(dane)
|
ret += str(dane)
|
||||||
|
except:
|
||||||
|
ret += "Bład pliku"
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
print(
|
print(info("images/IMG_123311x.jpg"))
|
||||||
info("images/IMG_12330.jpg")
|
|
||||||
)
|
|
||||||
Reference in New Issue
Block a user