Export to the file with Alpha layer
Hello
I m looking to create an Automation that takes each layer in a Photoshop Document and export it to a TIFF file with an Alpha channel.
There was very little action that export the layer selected as a TIFF with Alpha and there is of course the function of 'layer to export to files '.
I don't know how I can combine these functions, and it would be great if I could get this feature in a droplet.
Maybe you can guide me in the right direction
It treats pixel and the type of layers and masks on the groups would apply, perhaps you want to give it a try.
Save your hair without transparency, but with pixels alpha channels and layers type;
2014, use it at your own risk.
#target photoshop
If (app.documents.length > 0) {}
myDocument var = app.activeDocument;
var myDocument.name.match = basename (/(.*)-.) [ ^\.] +$/)[1];
try {var docPath = myDocument.path}
catch (e) {var docPath = "~ / Desktop"};
var theDup = myDocument.duplicate ("thecopy", false);
deleteAlphaChannels();
main (theDup, docPath, basename);
theDup.close (SaveOptions.DONOTSAVECHANGES);
};
////////////////////////////////////
getAllLayersBounds.jsx
main function (dittos, docPath, basename) {}
showAllLayers();
get the number of layers;
Var ref = new ActionReference();
ref.putEnumerated (charIDToTypeID ("Dcmn"), charIDToTypeID ("Ordn"), charIDToTypeID ("Trgt"));
var applicationDesc = executeActionGet (ref);
var number = applicationDesc.getInteger (stringIDToTypeID ("numberOfLayers"));
//////
for (var m = 0; m<= thenumber;="" m++)="">=>
try {}
Var ref = new ActionReference();
ref.putIndex (charIDToTypeID ("Lyr"), m);
var layerDesc = executeActionGet (ref);
var layerSet is typeIDToStringID (layerDesc.getEnumerationValue (stringIDToTypeID ("layerSection")));.
isBackground var = layerDesc.getBoolean (stringIDToTypeID ('background'));
var layerKind = layerDesc.getInteger (stringIDToTypeID ("layerKind"));
theName var = layerDesc.getString (stringIDToTypeID ('name'));
"adjustment".
otherwise the layer group.
If (layerSet! = "layerSectionEnd" & layerSet! = "layerSectionStart" / * & isBackground! = true * /) {}
If (layerKind == 1 | layerKind == 3) {}
hideOthers (m);
do twice;
var theDup2 = theFile.duplicate ("thecopy2", true);
addTransparencyAsChannelaAndFlatten();
Save and close;
saveCopyAsTif (theDup2, docPath + ' / ' + name of base + '_' + theName ".tif");
theDup2.close (SaveOptions.DONOTSAVECHANGES);
hideOthers (m)
};
//
};
}
catch (e) {};
};
};
substance.
function addTransparencyAsChannelaAndFlatten () {}
try {}
transparency mask;
// =======================================================
var idMk = charIDToTypeID ("Mk");
var desc3 = new ActionDescriptor();
var idNw = charIDToTypeID ('Nw');
var idChnl = charIDToTypeID ('channel');
Desc3.putClass (idNw, idChnl);
var idAt = charIDToTypeID ('At');
ref2 var = new ActionReference();
var idChnl = charIDToTypeID ('channel');
var idChnl = charIDToTypeID ('channel');
var idMsk = charIDToTypeID ("Msk");
ref2.putEnumerated (idChnl, idChnl, idMsk);
Desc3.putReference (idAt, ref2);
var idUsng = charIDToTypeID ("Usng");
var idUsrM = charIDToTypeID ("rocket");
var idTrns = charIDToTypeID ("Trns");
Desc3.putEnumerated (idUsng, idUsrM, idTrns);
executeAction (idMk, desc3, DialogModes.NO);
alpha channel of the layer mask.
// =======================================================
var idDplc = charIDToTypeID ("Dplc");
var desc4 = new ActionDescriptor();
var idnull = charIDToTypeID ("null");
Ref3 var = new ActionReference();
var idChnl = charIDToTypeID ('channel');
var idOrdn = charIDToTypeID ('Ordn');
var idTrgt = charIDToTypeID ("Trgt");
Ref3.putEnumerated (idChnl, idOrdn, idTrgt);
Desc4.putReference (idnull, ref3);
executeAction (idDplc, desc4, DialogModes.NO);
remove the layer mask;
// =======================================================
var idDlt = charIDToTypeID ("Dlt");
var desc5 = new ActionDescriptor();
var idnull = charIDToTypeID ("null");
ref4 var = new ActionReference();
var idChnl = charIDToTypeID ('channel');
var idChnl = charIDToTypeID ('channel');
var idMsk = charIDToTypeID ("Msk");
ref4.putEnumerated (idChnl, idChnl, idMsk);
Desc5.putReference (idnull, ref4);
executeAction (idDlt, desc5, DialogModes.NO);
flatten;
// =======================================================
var idFltI = charIDToTypeID ("FltI");
executeAction (idFltI, undefined, DialogModes.NO);
} catch (e) {}
};
by mike hale, through paul riggott.
http://forums.Adobe.com/message/1944754#1944754
function selectLayerByIndex (index, add) {}
Add = undefined? Add = false: Add
Var ref = new ActionReference();
ref.putIndex (charIDToTypeID ("Lyr"), index);
var / / desc = new ActionDescriptor();
desc.putReference (charIDToTypeID ("null"), ref);
If (Add) desc.putEnumerated (stringIDToTypeID ("selectionModifier"), stringIDToTypeID ("selectionModifierType"), stringIDToTypeID ("addToSelection'));
desc.putBoolean (charIDToTypeID ("MKV"), false);
try {}
executeAction (charIDToTypeID ("slct"), desc, DialogModes.NO);
} catch (e) {}
Alert (e.message);
}
};
Remove alpha channels.
function deleteAlphaChannels () {}
Var ref = new ActionReference();
ref.putEnumerated (charIDToTypeID ("Lyr"), charIDToTypeID ("Ordn"), charIDToTypeID ("Trgt"));
ref.putEnumerated (charIDToTypeID ("Dcmn"), charIDToTypeID ("Ordn"), charIDToTypeID ("Trgt"));
var docDesc = executeActionGet (ref);
var theChannels = docDesc.getString (stringIDToTypeID ("numberOfChannels"));
Check the channels;
for (var m = theChannels; > 0; m - m) {}
ref2 var = new ActionReference();
ref2.putIndex (charIDToTypeID ("one"), m);
var channelDesc = executeActionGet (ref2);
Alpha var = channelDesc.hasKey (stringIDToTypeID ("alphaChannelOptions"));
Remove alpha channels;
If (alpha == true) {}
keep the channels spots;
If (channelDesc.getObjectValue (stringIDToTypeID ("alphaChannelOptions")) .getObjectValue (strin gIDToTypeID ("color")) .hasKey (stringIDToTypeID ("book")) == false) {}
// =======================================================
var idDlt = charIDToTypeID ("Dlt");
var desc7 = new ActionDescriptor();
var idnull = charIDToTypeID ("null");
var ref1 = new ActionReference();
Ref1.putIndex (charIDToTypeID ("one"), m);
desc7.putReference (idnull, ref1);
executeAction (idDlt, desc7, DialogModes.NO);
};
};
};
};
Save pdf.
function saveCopyAsTif (myDocument, path) {}
tif options;
tifOpts = new TiffSaveOptions();
tifOpts.embedColorProfile = true;
tifOpts.imageCompression = TIFFEncoding.TIFFLZW;
tifOpts.alphaChannels = true;
tifOpts.byteOrder = ByteOrder.MACOS;
tifOpts.layers = true;
Save the copy;
myDocument.saveAs ((new File (path)), tifOpts, true);
};
hide others.
function hideOthers (theIndex) {}
hide the other;
// =======================================================
var idShw = charIDToTypeID ("Shw");
var desc10 = new ActionDescriptor();
var idnull = charIDToTypeID ("null");
var officielle4 = new ActionList();
ref7 var = new ActionReference();
Ref7.putIndex (charIDToTypeID ("Lyr"), theIndex);
LIST4.putReference (ref7);
desc10.putList (idnull, list4);
var idTglO = charIDToTypeID ("TglO");
desc10.putBoolean (idTglO, true);
executeAction (idShw, desc10, DialogModes.NO);
};
by mike hale, through paul riggott.
http://forums.Adobe.com/message/1944754#1944754
function selectLayerByIndex (index, add) {}
Add = undefined? Add = false: Add
Var ref = new ActionReference();
ref.putIndex (charIDToTypeID ("Lyr"), index);
var / / desc = new ActionDescriptor();
desc.putReference (charIDToTypeID ("null"), ref);
If (Add) desc.putEnumerated (stringIDToTypeID ("selectionModifier"), stringIDToTypeID ("selectionModifierType"), stringIDToTypeID ("addToSelection'));
desc.putBoolean (charIDToTypeID ("MKV"), false);
try {}
executeAction (charIDToTypeID ("slct"), desc, DialogModes.NO);
} catch (e) {}
Alert (e.message);
}
};
Display all layers.
function showAllLayers () {}
get the number of layers;
Var ref = new ActionReference();
ref.putEnumerated (charIDToTypeID ("Dcmn"), charIDToTypeID ("Ordn"), charIDToTypeID ("Trgt"));
var applicationDesc = executeActionGet (ref);
var number = applicationDesc.getInteger (stringIDToTypeID ("numberOfLayers"));
//////
for (var m = 0; m<= thenumber;="" m++)="">=>
try {}
// =======================================================
idHd var = charIDToTypeID ("Shw");
var desc9 = new ActionDescriptor();
var idnull = charIDToTypeID ("null");
var list1 = new ActionList();
Ref3 var = new ActionReference();
Ref3.putIndex (charIDToTypeID ("Lyr"), m);
List1.putReference (ref3);
desc9.putList (idnull, list1);
executeAction (idHd, desc9, DialogModes.NO);
}
catch (e) {};
};
};
Tags: Photoshop
Similar Questions
-
Update the clips with Alpha channel does not work after August 2016
It's really random, I have a bunch of Silhouettes of Motion Designer of Digital Juice in my current project, and after the last update, none of them appear in the monitor of the composition. The clips are still there. Nothing is changed. But none of the Silhouettes. They are Quicktime video files with alpha and have the silhouette of a person to perform various tasks.
They are not involved in After Effects and first.
I have also a few clips with alpha explosion on my calendar. Those who still work, but they are not as vivid and intense as they were before the update.
Help? All advice would be much appreciated.
all the information I have shows that there is a bug in 13.8.1 on some OS systems. What is yours? It mainly occurs on Windows 10 and a few BONES. the solution is to uninstall quicktime or working with the version 2015.2. Have a look here:
Re: New update broke PNG .mov format
Color of EI error/bug on PNG + (codec)
Problems with fire and muzzle Flash Active
Re: AE interpereting not color values
Layers of color to Alpha. MOV shifted on reopening program
Re: Images of channel Alpha displays incorrect colors. Need help ASAP! I have samples
a shared sorrow is a reduced sentence by half
Why what happened? My guess would be that it comes to this
Source: update is now available from effects CC 2015.3 (13.8.1) Bug - Fix | Creative blog Cloud by Adobe
Please file a bug report and also a link to this thread: feature request/Bug Report Form
-
Save the file with the same name
How to change the script to save the file with the same name?
//SaveforWebSP.jsx //Save a fixed width image with a size constraint in its original folder var docRef = activeDocument; var outputFolder = docRef.path; NamesaveRef = new File( outputFolder + "/reference.jpg" ); var NewfileRef = new File( NamesaveRef ) // quality/size constraints var w = 1920; // new file width var MaxSz = 361440; // max. 360Kb var Qlt = 100; // initial quality 100 var x = 1; // decreasing step // resize the image to the right width docRef.resizeImage(UnitValue(w,"px"),null,100,ResampleMethod.BICUBICSHARPER); // Perform the first SaveForWeb Operation ExpWeb(NewfileRef, Qlt); // Keep trying to save the file with max. Qlt, but under MaxSz while (NewfileRef.length > MaxSz) { Qlt = Qlt - x; NewfileRef = new File( NewfileRef ); NewfileRef.remove(); ExpWeb(NewfileRef, Qlt); // Perform a new SaveForWeb Operation, with slightly lower Qlt if (Qlt <= 40) { alert("The file can't be saved with the desired size AND quality."); break // break the loop whenever the quality is as low as 50 (this shouldn't need to happen) } } var FileSz = NewfileRef.length/1024; FileSz = Math.round(FileSz); // close the original file without saving activeDocument.close(SaveOptions.DONOTSAVECHANGES); // SaveForWeb Export, with the desired constraints and parameters function ExpWeb(FileNm, Qlt) { var options = new ExportOptionsSaveForWeb(); options.quality = Qlt; // Start with highest quality (biggest file). options.format = SaveDocumentType.JPEG; // Save Format for the file docRef.exportDocument(File(FileNm), ExportType.SAVEFORWEB, options); }
Change of line 25 to:
var docName = docRef.name.split('.')[0]; NamesaveRef = new File( outputFolder + "/"+docName +".jpg");
-
I got a used computer and it worked fine for a while. I guess that I did something for her, because now I had a problem with the opening just like files and almost all of the icons in the start menu. I found someone had mentioned this on another post, but it has not been answered and I have the same problem:
"I don't know what to do. I tried reseting IE back to its "settings by default, but nothing seems to work. It doesn't let me open any programs on my computer. I can't even find the virus because there asking what program I want to open it with and when to choose IE he sent me through a series of 'SAVE or RUN' windows and then back to the "choose a program you want to run the file with.» I am only able to access the internet via a shortcut of Internet Explorer button that I dragged on the start menu, because the original one on my desk does not open. »
It's the best way I can explain this problem. I've had this problem for a while now and I have looked everywhere for an answer and still nothing. It would be great to get help, thank you!
After much research, I found the answer here:
http://WindowsXP.MVPs.org/exefile.htm
But thanks for the help!
This problem has not helped me with my problems to download iTunes correctly, that's why I set out to solve this problem in the first place. I also get a lot of it popping up every 10 minutes:
"MobileDeviceService has encountered a problem and needs to close. We are sorry for the inconvenience. »
The error signature is always:
szAppName: AppleMobileDeviceService.exe szAppVer: 17.88.0.8
szModName: kernel32.dll szModVer: 5.1.2600.5781 offset: 00012afb
It won't do anything when I click to send error report or not, it does not close anything as it is normally would. I think it might have something to do with the steps I took to reinstall iTunes properly...
And
1. I use Microsoft Windows xp Version 5.1, at least that's the stuff I wrote, do not know if this is the answer you're looking for. I am not sure computers.
2. my anti-virus software is ESET NOD32 Antivirus 4
-
Windows media player does not automatically open a video file on a Web site but I save it and open the file with Windows media player to play the video or audio recording. I used to be able to play any video or audio file in any site!
Hello
Try resetting the default associations for WMP and IE.
How to set default Associations for a program under Vista
http://www.Vistax64.com/tutorials/83196-default-programs-program-default-associations.html
How to associate a file Type of Extension to a program under Vista
http://www.Vistax64.com/tutorials/69758-default-programs.htmlIf necessary:
How Unassociate a Type of Extension file in Vista - and a utility to help
http://www.Vistax64.com/tutorials/91920-unassociate-file-extention-type.html
Restore the Type Associations by default Vista file extensions
http://www.Vistax64.com/tutorials/233243-default-file-type-associations-restore.html
How to view and change an Extension of filename on Vista
http://www.Vistax64.com/tutorials/103171-file-name-extension.html====================================
Also follow these steps:
Follow these steps to remove corruption and missing/damaged file system repair or replacement.
Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup
Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN
sfc/scannow
How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
generates in Windows Vista cbs.log
http://support.Microsoft.com/kb/928228Then, run checkdisk - schedule it to run at next boot, then apply OK your way out, then restart.
How to run the check disk at startup in Vista
http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html------------------------------------------------------------
Then, if necessary:
Have you recently installed another player?
Reset your associations for WMP and IE.
How to set default Associations for a program under Vista
http://www.Vistax64.com/tutorials/83196-default-programs-program-default-associations.html
How to associate a file Type of Extension to a program under Vista
http://www.Vistax64.com/tutorials/69758-default-programs.html---------------------------------------------
Do this to reregister the Jscript.dll and Vbscript.dll files.
Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN
type or copy and paste-> regsvr32 jscript.dll
Press entertype or copy and paste-> regsvr32 vbscript.dll
Press enterRestart and if all goes well, it will run now.
--------------------------------------------------------------
Have you recently added stores or ANY application from Stardock?
Using 64-bit Vista?
Can you think of recent things you did in WMP which could be the cause? You added another
reader recently or an add-on for WMP?When I try to use Windows Media Player 11, the program does not start, or some UI elements
are empty - a Mr Fixit
http://support.Microsoft.com/kb/925704/en-usMaybe something here
http://msmvps.com/blogs/chrisl/articles/17315.aspx
and here
http://msmvps.com/blogs/chrisl/Archive/2004/10/30/17399.aspxCheck here the news of WMP11
http://zachd.com/PSS/PSS.htmlI hope this helps.
I hope this helps.
Rob - bicycle - Mark Twain said it is good.
-
Open the file with Buddy API... and WITH...
Hello
It works well:
on exitFrame me
myFile = the moviePath & "IMBNRadio.M3U".
OK = baOpenFile (myFile, "normal")
end
It opens the multimedia file. M3u with Windows Media Player, but what happens if I want to open the file with another player?
How can I do?
Thank you
See baShell() or baRunProgram()
-
Is it possible to export all the files in a pile when it's minimized?
Is it possible to export all the files in a pile when it's minimized?
Only the top photo is selected. Press the S key to develop the battery and then use the shift key to select all of the battery. After export press S to re - stack or use the Photo menu.
-
B2B generate the file with the file extension will start
Hi guru B2B.
We have a problem with the name of the output file. We have customized the java class to change the file name out based on operational needs. It works well, but recently, we see the file with the extension name from "start" are generated with size '0 '. The right files always generated with the appropriate content.
Can someone tell us what is causing this problem?
Thank you in advance,
NAFTA Li
Hi Alena
I assume you are using a B2B channel tuned to retrieve messages in a folder. Please check if this channel to listen is to have the parameter enable selected marker.
Disabling the marker Enable should avoid generating the file start in the folder.
Thank you
Arun
-
Save the file with the annotation and highlighting
Hello world
I used to save the file with the annotation and emphasize locally.
With the new update: Version 2015.009.20079, I'm not able to do as much as Adobe does not have the location of the local file.
Why is it like that? Is there a setting that is required to restore the previous behavior of the program?
Concerning
Mohammed
Hi Mohammed,.
In this case you may need to check the configuration of this application settings or set Acrobat Reader preferences.
Thank you
Abhishek
-
Windows 8.1 in Adobe Illustrator, I tried to copy my design & tried to paste it, but after sticking the image (file), now the color looks different, drive and lighter. So, kindly inform how to paste the file with 100% same resolution / color / appearance. Thank you.
Hi GANESHKUMARAPILLAI CHRYSTELLE,.
Here is a link for color management workflows in Illustrator.
It is best to place the image instead of paste into Illustrator. When you paste the images they are in RGB color format. Make sure your document is a RGB file
Click on these links for more information.
Understand the workflow of the CC of individual course Illustrator color management: Advanced
Creative Suite * keeping colors consistent
Implement the print color management workflow. Illustrator, InDesign, Photoshop
Concerning
Scott
-
Frequently, Adobe Edge animate the files with the *.an extension will open with the menu completely empty elements.
The HTML file remains in the folder, it works, but it is impossible to repeat the file Edge animate again. What can I do to restore the file or to prevent other cases like this?
Above all, why do?
Maybe because some elements such as an image or a code has been changed while the file *.an was opened while the change has been made?
Thank you very much
Paulo Tasca
NextPage
Sao Paulo, Brazil
See my tutorial can help:
-
The Pro Adobe bought, downloaded the file (with 1, 67MB) on laptop with OS Win8. When you try to install (my memory C: 2.39 GB free) the file, Adobe dialog says "the computer memory space is not enough. This is ridiculous. What can I do?
Just click on the link acrobat XI and download download Acrobat pro products, acrobat XI | Standard, Pro | XI, X
-
When I tried to open the bought one of the files with Adobe Reader purchase ebook, he said
Adobe Reader could not open ' URLlink (2) .acsm ' because it is not a type of supported file or because the file has been damaged (for example, it was sent as an attachment to e-mail and has not been correctly decoded).
Adobe Reader can open PDF files; for the .acsm file, you need Adobe Digital Editions.
-
export the video with alpha channel
Hello
I am brand new with Pro CC first. I completed a sequence where V1 has a series of still images, of small size, so I can see the video clip on the V2 in the background.
I already exported only and it works very well.
I would now like to export the clip on V1 by single with alpha channel so that I could put a different background in a new sequence.
Read and followed the instructions as described in the forum, but they must use something different than what I use (first Pro CC on a laptop with windows 7 Professional), because I do not see the indicated settings.
Once the clip is exported with an Alpha channel, I'll bring Premier Pro and everything just change the background several times so I will gradually in with several different sequences.
How could I accomplish this export with an Alpha channel?
Thanks for the info.
Bert
Hi Bert,.
I think you have your tracks reversed, the stills would be on background on V1 and V2. Of course, if a SINGLE export with alpha and no background, then you can simply use V1 (but later, we clip you made must be V2 or higher to insert background on a bottom rail to show areas of the alpha channel). Export using QuickTime > GoPro 12-bit with Alpha codec.
Thank you
Jeff Pulera
Safe Harbor computers
-
In Adobe Captivate, there is a 'PDF export' checkbox when you publish your project.
He checked the box, and the publication of project created a file with the extension PDF... but it's actually a video. Shouldn't it exported slides as appropriate PDF document?
No, it was published in an interactive PDF, has always been the case. It's another way to publish the video, that does not need to deploy it to an LMS or a Web server, you can send the PDF file. However, since Flash player is is more integrated in later versions of the Adobe Reader software, the user is to install it.
Maybe you are looking for
-
Do not get the new look of Firefox 4
I upgraded my Firefox 4.0.1 desktop (Windows XP, but I still don't have the same 'look' as with the previous version.) I uninstalled and then did install a new one, but still not 'old' aspect is however the 4.0.1 version Firefox, however on my laptop
-
Satellite L500-164 - keyboard must change in English or Greek
Hello I am a student in Germany now and I was thinking of buying the Satellite L500-164.The problem is, in all stores, you can buy it only with the German keyboard I completely hate. Is it possible to change it to an English (or Greek)?How much will
-
C4480 printer does not print on the internet
I hope I'm doing this right. I tried searching for this problem. I'm awfully lack of navigational skills. And many computer skills, I'm afraid. I have Windows Vista and just downloaded IE9, but the problem started when I was with IE8. The upgrade
-
Microsoft has a software that cleans, repairs and fix registry errors for free?
Clean and fix free registry errors Microsoft has a software that cleans, repairs and fix registry errors for free
-
Pavilion 15: get a new motherboard
I need some tips to get a new motherboard for my laptop (if possible). Here are the specifications of my laptop: Model--> 15 number - e052se Product number--> E0Y23EA #ABV Operating systemWindows 8 64-bit language CENTRAL PROCESSING UNIT Intel Core i