I need to use the color to alpha filter on many hundreds of images. It’s not feasible for me to do it one by one.
I know Krita has a command line but I’ve never used it.
Is it possible to automate the above task with it?
I don’t know about the command line but you can do it by importing the images as an animated sequence then applying a colour to alpha filter layer then rendering the animation out as an image sequence.
That will use the same colour value for the filter on each frame.
The images will need to be the same size and have a common naming scheme with sequential numbering from -000.png to -xyz.png so you can bring them in with
File → Import animation frames.
I don’t know what happens if they’re not the same size. Maybe if the largest one is first at -000.png then it will work out. Give it a try and see what happens.
Just a quick note: If you Import lots of image frames in that way, the RAM used by krita will rise to more than the size of the total collection of .png files. This is because the .png files are compressed but live storage in an open .kra file isn’t.
Do a few at a time and note the RAM usage on the status bar RAM meter.
You may have to do a hundred at a time, or whatever, depending on how big they are and how much RAM your computer has.
Remember to turn off the visibility of any background layer
Thanks again - especially for the very quick response.
Everything worked out perfectly!
I had to do 240 frames for now, ~2000 wide but with very simple content so I didn’t notice any memory problems.
My original problem was quite convoluted (faking 32 bit additive alpha rendered from 3D to simple 8bit transparency) but I’m glad I found a relatively simple solution with Krita. I might even make a quick tutorial about it for Blender users
If you do make a Blender tutorial, please give a link to it here in a new topic in the
Resources: Tutorials category.
There are quite a few people here who use Blender and plugins are under development to make a ‘link’ between Blender and Krita.
Use the search facility to look for “Blender” and you’ll find various topics that might interest you.