Jump to content

How to export each layer as its own file in Gimp


Recommended Posts

Here's something I've found very helpful.  This Gimp script exports every layer as a separate file, while allowing you to use text, the layer names, the file name or any combination of the three as the exported file names.  Just download it, and drop it into the folder named "Scripts" inside your Gimp folder, and restart Gimp. There should now be an option under File > called "Layers".

https://github.com/s...port-layers.scm

There are a lot of ways to use it.  Some ways I commonly use are to break GIFS down into individual frames (you can process a huge gif in a few minutes this way), or to process large amounts of a characters sprites at once.  Here's the step by step (day by day, a fresh start over, a different hand to play):

 

___/ FOR GIFS

1) Open up the GIF in Gimp.  It should be in indexed color mode.

 

2) Set your foreground color to ff00ff magenta.

3) Open the Colormap dialogue window to view the palette.  Right

click on the palette, and click "Add color from FG".

4) Right click on the palette in the Colormap dialog again and click
"Rearrange Colormap". A window will open where you can drag each color
do a different position by clicking and holding while you move it.

5) Move magenta up to the first slot and click OK.

6) Optional: go to "Layer > Stack > Reverse Layer Order" to put the
frames in their original order.

7) Name each layer a number. Top layer "01", second layer "02" etc...

 

8) Go to "File > Layers", select an output directory, set Filename format
to "WhateverYouWant~l.png", minus the quotes of course, and click ok.

 

 

___/ FOR A BUNCH OF CHARACTER SPRITES

 

1) Open up a character in FF3.
 

2) Click Sprites > Save Image... > Select "All" or "Group" > Choose a folder (helpful to create a new folder before hand inside the char folder).  Enter the characters name and hit ok.

3) Once you've saved all the characters sprites in a folder, go through and delete the ones that don't use the characters palette. (only necessary if you saved all of them)
 

4) Open the first sprite in Gimp.  The palette should be intact.  Then click File > Open as Layers... and highlight all but the first sprite, and click ok.

 

5) Smile.  You now have all of the characters sprites (that use their main palette) open in Gimp, with the layers named as the Group / Index, ready for export.

 

6) Make whatever changes you want.  When you're done doing whatever you wanted to do, File > Layers, and choose a destination file to export your edited sprites to.

 

7) Open up FF3 and open the character, and go into the sprites section. 

8)  How you loading the new sprites into the character depends on what you want to do.  When loading many sprites, pay close attention to the file names, because when FF3 saves them it doesn't upt 0's before single digit numbers so the file order can be a bit weird.

8a) If you want to replace existing sprites in a group or groups you'll have to do it one at a time to preserve the x, y axis.  You basically just click "Add New Image for Sprite from a File..." (the second icon) for each frame, and select the new sprite.

8b) If you're adding in a new group, say a new attack you've created from existing sprites, just click "Add One or More Sprites..." (the first icon), highlight all of them and click ok.  Now all you have to do is name the groups and indexes, set the alignments how you want them and you're good to go 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...