The VG Resource
Automatic Icon Generator for Sprite Sheets - Printable Version

+- The VG Resource (https://www.vg-resource.com)
+-- Forum: The Resources (https://www.vg-resource.com/forum-109.html)
+--- Forum: General Ripping (https://www.vg-resource.com/forum-145.html)
+--- Thread: Automatic Icon Generator for Sprite Sheets (/thread-42331.html)



Automatic Icon Generator for Sprite Sheets - shortterminology - 01-07-2024

First time posting here in the forums, so sorry in advance if this is the wrong place to put this! But I just wrote a simple Python script that will go through a folder of spritesheets and create 148px x 125px icons based off of the top-left sprite in each one. It's definitely not foolproof and hasn't been super rigorously tested with differently-sized sprites, but it worked pretty well for some small pixel character sprites I was ripping. So just thought I'd share in case it's helpful to anyone else!


.txt   automated_icon_generator.txt (Size: 3.79 KB / Downloads: 59)
(.txt file, needs to be changed to .py extension)

Some other notes: It works based off of transparency and relies on there being at least one full row/column of 100% transparency on each side of the sprite. It also probably won't work well with any sprite sheet that has borders or other objects that might block it from scanning for the first sprite (like headings or titles).