Possible? Batch action, select a colour and delete

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  03 March 2013
Possible? Batch action, select a colour and delete

I have a bunch of clip art that is centered on a white background.

I want to select the white background, delete it (make transparent) and then save back to GIF.

Now, every single pic I have (and there are thousands) has a white background, so is it possible to script something something like this:

1. Open file
2. Select colour/magic wand based on colour value of pixel at location 0,0
3. Delete the selected colour (white)
4. Save as GIF with transparency

  03 March 2013
I'm not sure that will work,or I should say I never tried it. I did once make an action (a droplet) that deleted a background I didn't like (from a folder of images), dropped in a transparent background and saved each image as transparent PNG files. It could probably work for saving as Gifs also.
Why not duplicate the image files (so you don't mess up the originals) and give it a try?
I like to learn.
  03 March 2013
How did you go about selecting/deleting the background automatically?

I should also say I am using CS3.
  03 March 2013
I deleted it when recording the Action.
I like to learn.
  03 March 2013
Ahhh, okay, it seems this is all possible with actions.

When you use the magic wand tool, it records the location of where you sample. To then crop the image to size (getting rid of white space) you just invert the selection and "crop"

So the action set basically goes:

Open file
Select magic wand at 1,1
Invert Selection
Save As GIF

I am impressed that the Actions could handle that so easily
  03 March 2013
Question on the side: why are you using GIF?

Another option to remove the white background without using the magic wand tool is to use the blending options in the layer style dialog to remove white, convert layer to flattened version.
  03 March 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:01 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.