![]() |
| |||||||
| Photo Retouching "Improving" photos, post-production, correction, etc. |
| | Thread Tools |
|
#1
| ||||
| ||||
| A way to delete all alpha channels at once? Hi all. I am trying to come up with a way to include a command in my flattening action that deletes all alpha channels in a psd document. The idea is to be able to select a bunch of psd from the bridge and, by the use of the image processor, batch save them all as flattened tiff. That's the easy part. I noticed that not all alpha channels get deleted during flattening and since the image processor doesn't give an option whether to preserve layers or not, I end up with bigger files to upload back to the clients and the size difference is noticeable. Basically i need a command tho include in my action, that will delete all alpha channels regardless of their names so that i don't have to do it one by one. Thanks |
|
#2
| ||||
| ||||
| Re: A way to delete all alpha channels at once? With actions alone its not possible, but you could use a script like this: Quote:
|
|
#3
| ||||
| ||||
| Re: A way to delete all alpha channels at once? Amazing, you just saved me a lot of time. Thanks |
|
#4
| ||||
| ||||
| Re: A way to delete all alpha channels at once? Is there also a way to delete all paths from an image, because that would be awesome.... |
|
#5
| ||||
| ||||
| Re: A way to delete all alpha channels at once? Of course there is :-) Quote:
|
|
#6
| |||
| |||
| Re: A way to delete all alpha channels at once? can someone upload a copy of this script? |
|
#7
| ||||
| ||||
| Re: A way to delete all alpha channels at once? Why a copy? Just open a text editor (notepad), paste this: #target photoshop app.bringToFront(); var theImage = app.activeDocument; theImage.channels.removeAll(); And save the file as whatever.jsx. Then in photoshop, run that script by doing File->Scripts->Browse. You might aswell record an action while you call the script. In fact, now i have this action that i use from the bridge to create a bunch of flat TIFF. Select the images, then use the image processor and set it to save as tiff with LZW compression and have it run an action like this one: 1.Flatten Image. 2.Delete alpha channels (by using the script). 3.Convert to desired color profile. 4.Set mode to 8bit. That way, when I'm assigned a whole series of photos for retouch, i don't have to open them one by one to create the tiff files to send to the client. |
|
#8
| |||
| |||
| Re: A way to delete all alpha channels at once? you can also record actions that delete paths, channels, changes bit mode, converts etc. etc.....and go to "automate" "batch" "create droplet". it will create a little icon that you can save on your desktop or in your job folder....and all you have to do, when ready to supply final files to clients....is just drag the opened or unopened psd files onto this little droplet icon and PS will do all the work for you. It will run the appropriate action you assign and save the "final files" for delivery wherever you assign it to. |
|
#9
| ||||
| ||||
| Re: A way to delete all alpha channels at once? Good stuff KR1156! Quick flat tiff files with no alphas or paths... the way it should be. Now just one more question for total perfection. Is there any way to hook the bridge to an ftp to see remote folders? That would be a really nice feature! |
|
#10
| ||||
| ||||
| Re: A way to delete all alpha channels at once? Genius. These 2 scripts are just genius. Thank you very very much. |
|
#11
| ||||
| ||||
| Quote:
Quote:
i was looking for them googled and there you are! may i ask a question ? i have another situation , working on an image ,running some actions ,i get full of lots alpha channels i would like to delete them all , and continue to work on the same image do these script work in my case too? is there an action that could do the same job? thanks Jonas cheers Last edited by mantra; 02-25-2012 at 01:28 AM. |
|
#12
| ||||
| ||||
| Re: A way to delete all alpha channels at once? Hi Mantra :-), so you have a bunch of alpha channels in your image that you don't need and want to get rid of them without messing with any of your attached masks etc.? That's exactly what the above script does :-). Again, actions won't work because they need the names of the alpha channels that need to be deleted, but the script should work just fine :-). In fact I once created a "Megaflatten" script that'll get rid of all the alpha channels, paths, color samplers (which get saved in JPEGs otherwise!), layer comps, layers and guides (the guides were a little tougher because you can't delete them when there are none, so I first created a guide to be on the safe side and deleted all of them after that ;-)). You might just pick the lines you need from it and save it as anything.jsx :-). Also you'll get a history snapshot called "BACKUP" that'll contain everything you had before you ran the script but doesn't get saved (i.e. when you close the file, it'll get lost, no matter in what format you save it!). Quote:
|
|
#13
| ||||
| ||||
| Quote:
Last edited by mantra; 02-25-2012 at 04:51 AM. |
|
#14
| ||||
| ||||
| Re: A way to delete all alpha channels at once? Hi Der_W Thanks for posting your script! It's pretty slick. When I run it as you posted above, I get a few errors in the variable assignment stage. (see attached as an example). When I removed the "Create a new history state called "BACKUP"" and the "Clear Guides" sections, the script runs nicely but obviously doesn't create the history state or clear the guides. Any idea why I'm getting these errors? Thanks, Shift Studio. |
|
#15
| ||||
| ||||
| Re: A way to delete all alpha channels at once? Hi Shift, unfortunately I can't reproduce your error message here at my PC. I first thought it might be due to the script being created for German versions of Photoshop, but after switching to my English version, it's still running fine. Therefore if you feel comfortable with it, you could try recording the missing parts yourself (it's not that difficult, most of the steps are automated and you just need to find out, which parts you need :-)). For this you'll have to copy the file Scripting\Utilities\ScriptListener.8li into your Plug-ins\Automate folder. Now restart Photoshop, open any image and create a simple guide anywhere in it. Now go to "View"-"Clear guides" to clear all guides. Create a new history snapshot and call it "BACKUP" or whatever name you like. Next close Photoshop and look for a file called "ScriptingListenerJS.log" (on my Windows PC it's stored on my Desktop). In it you'll see the individual commands you did, each separated by Quote:
First thing you should see will be the open operation. You don't need that. Next comes the creation of the guides and after that clearing them. Since you need both, just copy those blocks and replace them in my script. The last useful block should be the creation of the backup state, you should see "BACKUP" somewhere in the block, so it's probably easy to identify. Replace the according block in my script as well. Now it should work, but there's one very important step missing! Either delete the ScriptListener.8li file from your "Automate" folder or put a "~" in front of the filename. Otherwise it'll run every time you start Photoshop and record everything you do as actions, which slows down Photoshop quite a lot! I hope that helps and you can work with my instructions, otherwise we'd maybe have to do a screen sharing or something like that and try to get it to work :-). |
|
#16
| ||||
| ||||
| Re: A way to delete all alpha channels at once? Hey, that worked like a charm. I the syntax looks similar except for some indents... Is it okay if I post the .jsx file here for PS CS5 on OSX 10.7.x ? Thanks for sharing your knowledge and time! --Shift Studio. |
|
#17
| ||||
| ||||
| Re: A way to delete all alpha channels at once? Of course you can post your version here, it'd be great to have a working script for Macs as well, since you're probably not the only one who had trouble with the PC version :-). |
|
#18
| ||||
| ||||
| Re: A way to delete all alpha channels at once? Alright, here is the MegaFlatten script as described above, works in PS CS5 on OSX. --Shift Studio. |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Misaligning color channels on purpose | Peer K | Photo Retouching | 11 | 01-21-2010 06:12 AM |
| Dodging and Burning on Channels? | snook305 | Photo Retouching | 8 | 04-30-2009 02:13 AM |
| additional color layer in channels palette? | danii | Photo Retouching | 4 | 06-27-2008 05:52 AM |
| I'd like a tutorial on Gradiated (sp?) alpha channels. | pixeltickler | RP Tutorials | 1 | 12-27-2003 11:28 PM |