help: Copy alpha channel to paste in a layer

Discussion of Automation, Image Workflow and Raw Image Workflow

Moderators: Tom, Kukurykus

JasonB

help: Copy alpha channel to paste in a layer

Post by JasonB »

hello All,

I'm attempting to:
1. copy the contents of an alpha channel
2. paste those contents into another document's layer
3. The copy doesn't seem to work -- instead I always end up copying the background layer...

I'm missing something and hoping someone here can help out

Thanks,
Jason

Here is my code snippit....

Code: Select allvar rgba = 4;
var alpha = 3;

if (texture.channels.length == rgba)
{
   //get the alpha channel
   texture.activechannel = texture.channels[alpha];
   texture.selection.selectAll();
   texture.selection.copy();

   // then there will be some paste code....
}
JasonB

help: Copy alpha channel to paste in a layer

Post by JasonB »

ok .. feel stupid -- but after working for a bit and flailing and not finding what I wanted -- the solution has been posted here:

bb/viewtopic.php?f=9&t=2016&hilit=copy+alpha


Thanks --