Files
nearle-next-new/scratch/inspect_new_logo.py
2026-06-20 15:41:55 +05:30

24 lines
785 B
Python

from PIL import Image
def inspect_new_logo(path):
img = Image.open(path)
print("Mode:", img.mode)
print("Size:", img.size)
pixels = img.convert("RGBA").load()
width, height = img.size
colors = {}
for x in range(width):
for y in range(height):
r, g, b, a = pixels[x, y]
if a > 0:
color = (r, g, b, a)
colors[color] = colors.get(color, 0) + 1
print("New logo color counts:")
for color, count in sorted(colors.items(), key=lambda x: x[1], reverse=True)[:15]:
print(f"Color: {color}, count: {count}")
if __name__ == "__main__":
inspect_new_logo("/Users/apple/.gemini/antigravity-ide/brain/822556bd-47a7-4c07-8975-803618af0a3a/media__1781946188768.png")