Untitled

 avatar
unknown
gobstones
11 days ago
490 B
2
Indexable
import os
import numpy as np

img = "one.png"

if os.path.exists(img):
    file_size = os.path.getsize(img)
    
    print(f"Image File: {img}")
    print(f"File size: {file_size} bytes")


        with open(img, "rb") as file:
        header = file.read(20)
        print(f"File header: {header}")
    
else:
    print("file not found")


from PIL import Image

image = Image.open(img)


print(image)

print(f"Image size: {image.size} (WXH)")

image.show()

Editor is loading...
Leave a Comment