Initial commit

This commit is contained in:
2026-06-20 15:41:55 +05:30
commit 2778527442
163 changed files with 72703 additions and 0 deletions

24
scratch/inspect_glob.py Normal file
View File

@@ -0,0 +1,24 @@
from PIL import Image
def inspect_image(path):
img = Image.open(path)
print("Mode:", img.mode)
print("Size:", img.size)
# Check some pixels
pixels = img.convert("RGBA").load()
width, height = img.size
color_counts = {}
for x in range(0, width, max(1, width // 20)):
for y in range(0, height, max(1, height // 20)):
r, g, b, a = pixels[x, y]
color = (r, g, b, a)
color_counts[color] = color_counts.get(color, 0) + 1
print("Sample pixels:")
for color, count in sorted(color_counts.items(), key=lambda x: x[1], reverse=True)[:10]:
print(f"Color: {color}, count: {count}")
if __name__ == "__main__":
inspect_image("public/images/slider-glob.png")