I have a lot of CGI images with backgrounds needing removal.
They're lossless and the backgrounds are pure green. 00ff00. There's no anti-aliasing, and the job is easy. Problem is I only know how to do it manually at the moment.
Right now I'm using GIMP. Using GIMP I open the image, add an alpha channel, then use the select by color tool with threshold set to 0, then click the background hit delete and control+s to save it. Job done.... for one image. I have thousands. It's not so bad doing one, but as some of them are high resolution and slow to do the selection processing, it takes time.
I need every pure 00ff00 pixel from tons of CGI images turned into pure alpha.
What's the best program to use for this task?
Sounds like a task for imagemagick
Also get a real OS
Find a image processing library and write a small script in Python, seems easy enough.
1. Get all files with for example *.png extension from a folder.
2. Loop through them
- load file to memory or pass a path to the library
- tell it what to do (depends on a library)
- save it with a different name or to a different folder.
3. Done
>CGI images
>Computer generated image images
Anyways, if they're CGI, why didn't you render with an alpha bg in the first place?
Maybe write a script for Photoshop? It's possible to script things in JavaScript. It might even suffice to just create a custom action and run it in batch.
>>57715695
> being this illiteratefor name in *.png
do
convert "$name" -fuzz XX% -transparent 'rgb(0,255,0)' "output.$name"
done
>>57716178
oh yeah replace XX for whatever percentage you like. so 0 first and if that doesn't work increase to 1 etc.