Skip to main content
100%

Gist bcaa860506520cefb711aa4a9f885c12

✓ Published0🌍 Public
11wheel
Last edited Mar 27, 2019
Created on Mar 27, 2019

This example assembles a large sprite sheet of data visualization badges, arranging hundreds of PNG icons into a single 8192-pixel square grid. It shows the process of converting individual SVG badge files into a unified texture atlas for efficient loading in a projector tool. The script uses Python’s Pillow library (`Image.open`, `resize`, `paste`) to read, scale, and tile each icon, while calculating the grid dimensions with `math.sqrt`. It sorts the source files from a local SVG directory, converts them to PNGs, and saves the final composite to `sprite_image.png`.

AI-generated description

Similar vizzes