Home Technical Talk

Photoshop batch processing question

polycounter lvl 17
Offline / Send Message
Jaco polycounter lvl 17
I’ve got a folder full of tgas, and I need to make sure they’re all using RLE compression. The first solution that came to mind was to make an action that saves the tga with RLE compression, and then use batch processing to do it on the whole folder.

But there’s a problem, some of the files have alphas, and some don’t. So some are 24bit, and some 32bit. With my method it’s going to turn them all into 24 or 32 bits (The dialog where you choose RLE compression is also where you choose 24bit/32bit)

Is there some way to separate the 24 bits from the 32 bits? Am I being stupid here, is there an easier method? Will the action even ensure that all the tgas end up with RLE compression?

Any help would be much appreciated.

Replies

  • Snowfly
    Offline / Send Message
    Snowfly polycounter lvl 18
    Maybe not the all in one solution you want, but why don't you dump the 24-bit and 32-bit TGA's into their own folders, and process them there with different actions?
  • Jaco
    Offline / Send Message
    Jaco polycounter lvl 17
    Thanks for the reply Snowfly, that would be perfect, problem is there's over a thousand TGAs :( Is it possible to separate TGAs with an alpha channel from those without somehow?
  • ivars
    Offline / Send Message
    ivars polycounter lvl 17
    Are they in different resolutions?
    If they're the same, sort by size and the 32 bits will be bigger then the others.
  • Jaco
    Offline / Send Message
    Jaco polycounter lvl 17
    Thanks ivars, they're all different resolutions though :(
    I tried sorting by size, thinking that it would still break them up into groups of different resolutions. But the fact that there's 1300 TGAs with resolutions ranging from 128X128 to 2048X2048, some 24-bit some 32-bit, confused things a bit, to say the least.
  • Eric Chadwick
    Did you actually try a test? I think Photoshop is smart enough to recognise the difference when saving. Try it out on a test folder with two files.

    You could also try XNview, it has a great batch processor.
  • Jaco
    Offline / Send Message
    Jaco polycounter lvl 17
    I did a test, yes. It ends up creating an alpha channel for all of them, or deleting the existing ones, depending on whether I said 24-bit or 32-bit when I made the action.

    Thanks, I'll take a look at XNview
  • scotths
    Starting with CS2 (I think) Photoshop included the ability to create very robust scripts using javascript -- think about anything where an action was not quite able to do what you wanted it to do, like conditional logic (if there is an alpha channel do this, if there isn't do this other thing). If this is just a one-time shot, it might not be worth it to learn how to do it, but if it is something you do over and over it is totally worth it. I've saved over 500 hours in the past year on something I built with it.

    In the short term, you could build in a stop point into your action -- usually a point where PS will pull up a dialog box and ask you for input (say, at the save and compress step). Sure, you have to interact with each of your thousand files, but it often beats having to do 20 steps on each of your files.

    Scott
  • Eric Chadwick
    Yeah JS might be the way to go, if you're comfortable enough.

    Another option is one I used to batch resize a huge number of DXTs in various folders, bottom of the page here. Looks long and involved, but it's pretty quick for a one-off. Instead of using NVdxt, you could try something like this.
  • Jaco
    Offline / Send Message
    Jaco polycounter lvl 17
    Thanks scotths. That would have been perfect, but I've the scripting skills of a dung beetle :( Maybe it’s time I learn

    Eric, you sir, are a godsend! That’s exactly what I was looking for, many thanks
  • Eric Chadwick
    Cool man, let me know what tool you end up using for the TGAs, I might have to do something similar in the future.
  • Jaco
    Offline / Send Message
    Jaco polycounter lvl 17
    I went with Advanced Batch Converter. Just point to a folder, choose a format (along with compression settings) and you're done. The actual conversion is super quick, and I didn't have any problems with 24-bit or 32-bit TGAs
    It's a bit pricey though, so unless Photoshop can't do it I wouldn't recommend it
  • Eric Chadwick
    Thanks man, I never played with it, but good to know it's so usable.
Sign In or Register to comment.