YesNoOk
avatar

Automate process to convert all sprites to pcx using Photoshop (Read 13684 times)

Started by Cybaster, October 19, 2007, 04:11:53 PM
Share this topic:
Automate process to convert all sprites to pcx using Photoshop
#1  October 19, 2007, 04:11:53 PM
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
Made this topic so that people can just link to it. :)

Making a palette and converting from PNG (or any other format) to PCX using an automated process :

Start by putting many sprites on a single image, so that all the colors the char (and the effects, dunno) that will be in the character are on this single image.
Convert it from RGB colors to indexed colors (assuming you have photoshop, paintshop pro should work the same), and put the last color of the palette to be the transparent one (or the first one if you're using PaintShop Pro).
Save the palette. Now you have the palette you'll use for all sprites.

Still assuming you have photoshop, let's now create a batch file. Photoshop has a very powerful tool named "scripts", or "Actions".
Search the window to create a new script, and start registering. All the actions you're going to do now will be recorded, and when you'll launch the script on a folder for example, it will apply all the operations you've registered on all the files of the folder.

Press F9 to open the script (or action) creating window (or you should be able to open a window by clicking in the window section and choosing "Actions"). Now you should see something like that :


- Press button 4 to create a new folder (so that you don't clash with Photoshop's pre-built scripts)
- Press button 5 to create a new script.
Name them wisely to avoid any confusion later on.
- Now you should see that button 2 is pressed. All the actions you're going to do are going to be registered.

You can delete a script by pressing button 6. And when you want to stop registering, press button 1.

So what you should want to record is:
- open a sprite.
- convert it to RGB (if it's in indexed colors. Skip this step otherwise).
- Convert it back to indexed colors.
- don't chose "exact", but chose "custom" and load the palette you've created before.
- apply this palette.
- save the sprite.
- close it.

Stop recording. Now you have your script.
Search in file -> automate -> batch :

Select the folder you want to use the script on (the folder where all your files are, obviously)
Create another folder, and tell the automated tool to save the outputs in this folder (for the sake of backing up your files).
Launch the script, Photoshop should have all your files converted into PCX with the custom palette in less than 2 minutes.
Re: Automate process to convert all sprites to pcx using Photoshop
#2  October 19, 2007, 04:24:11 PM
  • ******
  • [E]
    • Mexico
needs more pics, considering it's intended use
Re: Automate process to convert all sprites to pcx using Photoshop
#3  October 19, 2007, 04:57:28 PM
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
Okay, will do so. I'll also try to add more details. Weekend should be enough to complete it.
Re: Automate process to convert all sprites to pcx using Photoshop
#4  December 08, 2007, 01:48:26 AM
  • *****
I have Photoshop 7.0, when I save a pic as a pcx while recording the script, the name of the pcx is recorded too :-X...thus the name applies for all the files after launching the script on them which leads in a single file existing in the output folder due to overwriting

BTW when I save sprite.png as a pcx, it ends up with this sprite.png.pcx, it's very disturbing so I should erase that ".png" for evey pcx, anything about how to get this solved ?
I don't play with Photoshop that often, so forgive my...
"I’m never gonna grab anything by its balls, especially life. especially if life shows up in the incarnation where it would have testicles. if life showed up and had balls, the last thing I would do is grab those balls" - kyle kinane
Re: Automate process to convert all sprites to pcx using Photoshop
#5  December 08, 2007, 05:31:13 AM
  • *****
    • Peru
I have an Action Group that converts all the layers from an image (in fact up to 30 layers) to PCXs using the last palette used when converting an image to 8bit.

Maybe you are interested Cybs:
http://mugenguild.com/~renzo/down/renzo.7z
Re: Automate process to convert all sprites to pcx using Photoshop
#6  December 12, 2007, 10:55:36 AM
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
I have Photoshop 7.0, when I save a pic as a pcx while recording the script, the name of the pcx is recorded too :-X...thus the name applies for all the files after launching the script on them which leads in a single file existing in the output folder due to overwriting
o_O
Are you sure you just clicked on "save image as" and just chose PCX in all the format options ? Don't touch the filename before chosing the format.

@ Renzo : thanks, that can be handy. :)
Re: Automate process to convert all sprites to pcx using Photoshop
#7  December 13, 2007, 04:48:00 AM
  • *****
    • Peru
If you want some directions on how to use the actions catch me up @ msn. You know, I have weird ways to do things like these. :)
Re: Automate process to convert all sprites to pcx using Photoshop
#8  December 24, 2007, 09:53:32 AM
  • avatar
  • ***
a vary easy way is to download alsee.. it can convert them way quicker then photoshop.. once (before my comp got slow) i converted 700 in under 6 seconds
Re: Automate process to convert all sprites to pcx using Photoshop
#9  November 17, 2011, 06:30:16 PM
  • *****
  • JoJo is boring
    • USA
Sorry for the bump, but I'm a bit curious about this batch processing.

Is there a way to set it up where it performs an action on one image and save it as different images?  What I mean by that is:

Spoiler, click to toggle visibilty

I want to turn the circle shapes and save it as one frame as it turns.  Is that possible or no?  Is there a way to make it repeat an action and specify a number of times you want it done?