Hello,
Here is in the attached file a python script to add in GIMP. It is supposed to be useful for pixel artists but also for those who rip game maps.
This one is not a Script-Fu, but a Python-Fu. My first script in Python... :) This is a beta version, I hope there will be not too many bugs. Please save your work before. Don't hesitate to report bugs.
See attachment file. (http://forum.solarus-games.org/index.php?action=dlattach;topic=1351.0;attach=795)
What is this kind of script?
It is explained here: https://docs.gimp.org/en/gimp-filters-python-fu.html (https://docs.gimp.org/en/gimp-filters-python-fu.html)
Where to copy it?
Unzip the folder before to copy it the right place.There are often two directories. You can find their path in:
"Edit" > "Preferences" > "Folders" > "Plug-Ins"
Some explanations
- It appears in the menu /Filters/pixelart-tileset-extractor of GIMP
- It extracts tiles from a tilemap to build quicker a tileset. This excludes tiles from the existing tileset, if any.
Example:
1 min 20 to extract the tiles from this image (https://vgmaps.com/Atlas/GB-GBC/LegendOfZelda-Link'sAwakening-Koholint.png) of 2560x2048 pixels (this represents 20480 tiles of 16px). Here, there is no existing tileset (so it is the layer's name that appears). If there was a tileset, I should have selected it (in "Tileset:") and tiles already known would have been excluded from the created tileset ("New tileset").
(http://froggy.web.pagesperso-orange.fr/gimp/script_tileset_extractor_demo.gif)
Excellent!
Thank you. As I said on Discord, don't hesitate to ask if you have questions about the script. There may be things to change, add or improve.
I copied the file to my plugins folder, and restarted Gimp, but I don't see anything new in my Filters menu. Is there a step I'm missing?
Ran Gimp in verbose mode, but didn't give much insight. "Unable to run plug-in. Failed to execute child process (No such file or directory)." No line number or routine or anything :(
Nevermind. I was running an old version of Gimp and didn't even realize it until I checked the script comment that said it was tested in 2.10.
Does it work properly now you use version 2.10 of Gimp?
Yes - works great!
So kewl! :)