CGTalk > Software > Photoshop / Painter
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 03-08-2013, 12:19 AM   #1
DoubleSupercool
Supreme Overlord 2IC
 
DoubleSupercool's Avatar
portfolio
Matt French
Japan
 
Join Date: May 2005
Posts: 1,215
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

Cheers
 
Old 03-08-2013, 12:28 AM   #2
Dillster
Always Learning
 
Dillster's Avatar
portfolio
Dylan Saunders
Dublin, Ireland
 
Join Date: Jan 2011
Posts: 2,907
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.
 
Old 03-08-2013, 12:38 AM   #3
DoubleSupercool
Supreme Overlord 2IC
 
DoubleSupercool's Avatar
portfolio
Matt French
Japan
 
Join Date: May 2005
Posts: 1,215
How did you go about selecting/deleting the background automatically?

I should also say I am using CS3.
 
Old 03-08-2013, 06:36 PM   #4
Dillster
Always Learning
 
Dillster's Avatar
portfolio
Dylan Saunders
Dublin, Ireland
 
Join Date: Jan 2011
Posts: 2,907
I deleted it when recording the Action.
__________________
I like to learn.
 
Old 03-09-2013, 12:28 AM   #5
DoubleSupercool
Supreme Overlord 2IC
 
DoubleSupercool's Avatar
portfolio
Matt French
Japan
 
Join Date: May 2005
Posts: 1,215
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
Delete
Invert Selection
Crop
Save As GIF

I am impressed that the Actions could handle that so easily
 
Old 03-09-2013, 10:12 PM   #6
hvanderwegen
Expert
 
hvanderwegen's Avatar
Herbert van der wegen
 
Join Date: Feb 2003
Posts: 569
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.
 
Old 03-09-2013, 10:12 PM   #7
CGTalk Moderation
Expert
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,478
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 07:07 PM.


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