Auto crop each layer before export layers to files

The integrated script "export layers to files" isn't crop jpeg exported to the size of the image on each layer.  Instead, it maintains the initial size of the photoshop file and puts the white around the image of the layer.  Y at - it a script that will trim the size of the layer before export for each layer?

I modified the original Adobe export of layers to Files.jsx to support the layers of trimming with transparency when exporting to JPEG.

Because of its size, you can find the script changed to http://ps-scripts.com/bb/viewtopic.php?f=10&t=3971

Tags: Photoshop

Similar Questions

  • Export layers to files... transparent tiff in CS5

    Hello world

    I have a frustrating situation with the export layers to files... script. When I choose the type of output to TIFF file, transparency is replaced with an opaque white background. Is it possible to modify the script so that it retains as with the outputs of png transparency?

    Thank you
    Chris

    I have a generic layer of Eve script that you might try...

    http://www.scriptsrus.TalkTalk.NET/layer%20Saver.htm

  • looking for how to export layers to file

    In 2014 CC and below there is a script called export layers to files.

    It was a quick way to all layers in an export for the web file.

    I'm on CC 2015 and that you want to use this script, but I can't.

    Is always available and hidden somewhere? Is tehre a better script for this that people have turned to?

    Thank you

    Hey johnc,

    It has been moved under export on the file menu.

    Concerning

    Sarika

  • Is there a way to export layers as files with all the additional numbers in the prefix?

    Hello world

    I officially spent 8 hours of research on this topic and I can't seem to get anywhere...

    I want to export a group of layers to files. I know the layers for the script file, not what I ask. I ask how to get rid of the "0000_0000" who loves to appear for no aparent reason.

    I have several sepaaret psd with about 10-25 layers each so I won't have to cross the bridge and rename everysingle time...

    Thank you very much in advance!

    see you soon

    -J

    We could, I suppose, inactivate line 1023

    fileNameBody += '_' + zeroSuppress (i, 4);

    by adding"/ /"at the beginning or delete.

    But maybe someone else has a Script customized to the task anyway.

  • Export layers to files - png

    When I run the export layers to script files in order to save my layers as png, it automatically changes the files at 72 dpi. I need to stay at 300 dpi, as in the original file. Someone can help me, how can I change the script to do this? Thanks in advance!

    It uses a scriptlistner version of save for web to png8 and png24. To change the png24 so that it uses a normal backup and retains the dpi find this line of code "case png24Index:"it should be on line 840. " Comment everything between this line and "pause:", on line 890. Then add the following lines.

    pngSaveOptions = new PNGSaveOptions();
    pngSaveOptions.interlaced = dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter.value;
    app.activeDocument.saveAs (new file (exportInfo.destination + ' / ' + fileNameBody + '.png'), pngSaveOptions, true, Extension.LOWERCASE);

    I have not tested this, you may also add controls for 8-bit, none of the extra layers, no alpha or spot channels, etc. SFW does most of the default. But using the method saveAs and copy setting to true, I think it will be ok.

  • Export layers to files: how to keep the size of the canvas

    Hello

    I need to export hundreds of layers of PNG files.

    Unfortunately, the Script cultures on the edge of the layer for each file has different dimensions. How to keep the size of the canvas of the PSD in the exported files?

    Thanks for your help

    PS-Version: MacOS, CS 5.1

    trim to untick if this does not work then

    http://www.filesresidence.com/file/acf00llbo09pg# , try this version it can do what you want.

  • Export layers to files - too files

    I have a PSD that is 100 pixels x 70 pixels at 72 dpi.  That's what I'm currently using as my size images 'thumbnail '.  I have 100 thumbnails to save the JPG format and use "Layers to export to files" and it worked like a charm.  He worked as expected until I accidentally saw that one of these images of 100 x 70 pixel was 70 KB file size.  I double checked and all my thumb nails are just around this size.  If I go into the file and save it on manually, even if it's the highest quality, the file size is only 11kb.  There is no way I can make each thumbnail at a time.

    No reason why the file size is 70 KB compared to the size of the file 7KO - 11KO should it be?

    Maybe it's that they are saved as normal rather than save for Web JPG?

    You may have more options with this script...

    http://www.scriptsrus.TalkTalk.NET/layer%20Saver.htm

  • How to create an animation with a picture for each layer?

    I have 76 image sequence that I loaded as a layer using bridge, then aligned using photoshop.

    I would now like to create an animation of 76 image with the image of an animation for each layer

    (the layers are in sequential order).

    y at - it an easy way to do

    or do I have to create 76 frames (can duplicate multiple to speed it up)

    then set the visibility of the layer for each frame?

    Thank you

    Bill w

    Astro.whwiii.NET

    You left out what software you have.  Older versions of Photoshop open the animation palette and then use the menu drop-down and click branding om of layers.  Version of Photoshop.  Open the palette of the timeline. Click on use the picture in the menu click animation drop-down palette make management of layers.

  • Layers of files

    I'm looking for modified versions of the "Layers to files" script that will export JPEGs that are named by group names & layer.

    For example, if I have a structure of group/layer like this:

    (' > ' are groups and ' *' are layers)

    > Phones

    > Blackberry

    * Storm

    > Apple

    * iPhone

    > HTC

    * NexusOne

    Is it possible to export layers to files so that the files are named should resemble:

    -Phones_Blackberry_Storm.jpg

    -Phones_Apple_iPhone.jpg

    -Phones_HTC_NexusOne.jpg

    I have a very large psd with many nested groups and layers that must be exported individually with a very specific naming scheme. Is there a script anywhere that lets get this?  Or is there a workaround that I've not been able to find? I looked everywhere and could not find the script changes that eliminate group/layer numbers.

    Any help is appreciated.

    Thank you

    This should be close...

    #target Photoshop
    main();
    function main(){
    if(!documents.length) return;
    selectAllLayers();
    var Lrs =  getSelectedLayersIdx();
    var Path = decodeURI(activeDocument.path);
    for(var a in Lrs){
       makeActiveByIndex( Lrs[a], false );
        if(app.activeDocument.activeLayer.kind == LayerKind.NORMAL){
            var APPN = app.activeDocument.activeLayer.parent.parent.name
            var APN = app.activeDocument.activeLayer.parent.name
            var AL = app.activeDocument.activeLayer.name;
            var Name = APPN + "_" +APN+"_"+AL+".jpg";
            dupLayers(Name);
            var saveFile = File(Path +"/" + Name);
            SaveJPEG(saveFile, 12);
            app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
            }
        }
    }
    function selectAllLayers(){
       var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
        desc.putReference( charIDToTypeID( "null" ), ref );
    executeAction( stringIDToTypeID( "selectAllLayers" ), desc, DialogModes.NO );
    }
    function getSelectedLayersIdx(){
       var selectedLayers = new Array;
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
       var desc = executeActionGet(ref);
       if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){
          desc = desc.getList( stringIDToTypeID( 'targetLayers' ));
          var c = desc.count
          var selectedLayers = new Array();
          for(var i=0;i		   
  • Is it possible to export each layer of an Illustrator file in PNG files automatically?

    Is it possible to automatically export each layer of an Illustrator file in PNG files, with PNG files, taking the name of the layer in the Illustrator file?

    I found this useful script before:

    http://www.Ericson.NET/content/2011/06/export-Illustrator-layers-andor-artboards-as-PNGs-a nd - PDF.

    It is very versatile

  • Export PNG with the correct name, for each layer, script file frame foreach

    Hello guys,.

    I am trying to find a script that exports each separately from the layer in PNG, for each image, with the correct name. By example, if the layer is named snail and lies in a forest of group name and is like 6, export this layer as a PNG named forest.snail.06.png (recursion if possible) and this for each layer, for each image...

    I found a software named Layerex, they speak here about layers export Flash | Global Facilitation network

    But I could not find... If you guys know how to do, it would be so awesome...

    Take care

    Simon

    Using jsfl.

  • Since the installation of the last Photoshop CC updated two days ago, Auto Blend to focus stacking is to select all pixels of the background layer instead of those of the better development of each layer. Also has anyone seen this problem?

    I installed the latest update of Photoshop CC on my Macbook Pro two days ago, and now when I try to focus stacking by opening several photos and make Auto Align and Auto mix, mixture selects the entire background layer instead of select areas of the development of each layer. I tried again on a series of images where it worked a week ago, and the problem occurs. I have Photoshop on a Windows 8 machine and did not apply this last update and it works fine. If anyone else has experienced this?

    And we now have the new version!  2014.2 is out and it's fine to focus stacking and Photomerge.

    -Christmas

  • How to batch export layers in png in cc files

    I have a problem with an export of layers to the script files I want to layer export batch in png and this script I have seems to be the only I can whenever I run the script I get this error message "Could not complete the action because the destination folder does not exist" the script required me to hardcode the my destination path the path that I need is "C:/users/Tim/Desktop/decors/png / '. I'm not completely sure why its registrant, that there is not any help would be greatly appreciated. I tried to contact the creator, but the post that it was was very old.

    activate the double click from the Macintosh Finder or Windows Explorer

    #target photoshop

    //=================================================================

    Globals

    //=================================================================

    exportPath var = ' / users/pedr/Documents/work/Clients/routes/Learning_Hub/Source/Comics/export ";

    exportPath = exportPath + "/ layers ';

    Localized UI strings

    var strTitle = localize("$$$/JavaScripts/X2L/Title=X2L");

    var strButtonRun = localize("$$$/JavaScripts/X2L/Run=Run");

    var strButtonCancel = localize("$$$/JavaScripts/X2L/Cancel=Cancel");

    var strHelpText = locate ("$$$ / JavaScripts/X2L/Help = Please specify the format and location for the registration of each layer as a file.");

    var strLabelDestination = localize("$$$/JavaScripts/X2L/Destination=Destination:");

    var strButtonBrowse = locate ("$$$ / JavaScripts/X2L/Browse = & Browse...");

    var strLabelFileNamePrefix = locate ("$$$ / JavaScripts/X2L/FileNamePrefix = filename prefix :"); ")

    var strCheckboxVisibleOnly = locate ("$$$ / JavaScripts/X2L/VisibleOnly only = & layers visible only");

    var strLabelFileType = locate ("$$$ / JavaScripts/X2L/FileType = Type of file :"); ")

    var strCheckboxIncludeICCProfile = locate ("$$$ / JavaScripts/X2L/IncludeICC = & include ICC profile");

    var strJPEGOptions = locate ("$$$ / JavaScripts/X2L/JPEGOptions = Options JPEG :"); ")

    var strLabelQuality = localize("$$$/JavaScripts/X2L/Quality=Quality:");

    var strCheckboxMaximizeCompatibility = locate ("$$$ / JavaScripts/X2L/enlarge = & maximize compatibility");

    var strTIFFOptions = locate ("$$$ / JavaScripts/X2L/TIFFOptions = TIFF Options :"); ")

    var strLabelImageCompression = locate ("$$$ / JavaScripts/X2L/ImageCompression = Compression of Image :"); ")

    var strNone = localize("$$$/JavaScripts/X2L/None=None");

    var strPDFOptions = locate ("$$$ / JavaScripts/X2L/PDFOptions = PDF Options :"); ")

    var strLabelEncoding = localize("$$$/JavaScripts/X2L/Encoding=Encoding:");

    var strTargaOptions = locate ("$$$ / JavaScripts/X2L/TargaOptions = Options of Targa :"); ")

    var strLabelDepth = localize("$$$/JavaScripts/X2L/Depth=Depth:");

    var strRadiobutton16bit = localize("$$$/JavaScripts/X2L/Bit16=16bit");

    var strRadiobutton24bit = localize("$$$/JavaScripts/X2L/Bit24=24bit");

    var strRadiobutton32bit = localize("$$$/JavaScripts/X2L/Bit32=32bit");

    var strBMPOptions = locate ("$$$ / JavaScripts/X2L/BMPOptions = Options of BMP :"); ")

    var strAlertSpecifyDestination = locate ("$$$ / JavaScripts/X2L/SpecifyDestination = please specify destination.");

    var strAlertDestinationNotExist = locate ("$$$ / JavaScripts/X2L/DestionationDoesNotExist = Destination does not exist.");

    var strTitleSelectDestination = locate ("$$$ / JavaScripts/X2L/SelectDestination = Select Destination");

    var strAlertDocumentMustBeOpened = locate ("$$$ / JavaScripts/X2L/OneDocument = you must have a document open for export!");

    var strAlertNeedMultipleLayers = locate ("$$$ / JavaScripts/X2L/NoLayers = you need a document with several layers to export!");

    var strAlertWasSuccessful = locate ("$$$ / JavaScripts/X2L/success = succeeded.");

    var strUnexpectedError = locate ("$$$ / JavaScripts/X2L/Unexpected = unexpected error");

    var strMessage = localize("$$$/JavaScripts/X2L/Message=X2L");

    var stretQuality = locate (' $$$ / locale_specific/JavaScripts/X2L/ETQualityLength = 30 ");

    var stretDestination = locate (' $$$ / locale_specific/JavaScripts/X2L/ETDestinationLength = 160 ');

    var strddFileType = locate (' $$$ / locale_specific/JavaScripts/X2L/DDFileType = 100 ');

    var strpnlOptions = locate (' $$$ / locale_specific/JavaScripts/X2L/PNLOptions = 100 ');

    var strPNG8Options = locate ("$$$ / JavaScripts/X2L/PNG8Options = PNG-8 Options :"); ")

    var strCheckboxPNGTransparency = localize("$$$/JavaScripts/X2L/Transparency=Transparency");

    var strCheckboxPNGInterlaced = localize("$$$/JavaScripts/X2L/Interlaced=Interlaced");

    var strCheckboxPNGTrm = locate ("$$$ / JavaScripts/X2L/Trim = Trim layers");

    var strPNG24Options = locate ("$$$ / JavaScripts/X2L/PNG24Options = Options format PNG-24 :"); ")

    the drop in the index from the file type list

    var png24Index = 7;

    main();

    ///////////////////////////////////////////////////////////////////////////////

    Functions

    ///////////////////////////////////////////////////////////////////////////////

    ///////////////////////////////////////////////////////////////////////////////

    Function: main

    Use: the core routine for this script

    Entry: < no >

    Return: < no >

    ///////////////////////////////////////////////////////////////////////////////

    main() {} function

    If (app.documents.length < = 0) {}

    If (DialogModes.NO! = app.playbackDisplayDialogs) {}

    Alert (strAlertDocumentMustBeOpened);

    }

    return to "Cancel"; quitting smoking, return "Cancel" (do not localize) makes the palette actions not to register our script

    }

    var exportInfo = new Object();

    initExportInfo (exportInfo);

    Search the last used via Photoshop register params, getCustomOptions rise if none does not exist

    try {}

    }

    {catch (e)}

    It's ok if we have any options, continue with the default settings

    }

    try {}

    var Nomdoc = app.activeDocument.name;  record the name of app.activeDocument before double.

    var layerCount = app.documents [docName].layers.length;

    var layerSetsCount = app.documents [docName].layerSets.length;

    If ((layerCount < = 1) & & (layerSetsCount < = 0)) {}

    If (DialogModes.NO! = app.playbackDisplayDialogs) {}

    Alert (strAlertNeedMultipleLayers);

    return to "Cancel"; quitting smoking, return "Cancel" (do not localize) makes the palette actions not to register our script

    }

    } else {}

    var rememberMaximize;

    var needMaximize = exportInfo.psdMaxComp? QueryStateType.ALWAYS: QueryStateType.NEVER;

    app.activeDocument = app.documents [docName];

    var duppedDocument = app.activeDocument.duplicate ();

    duppedDocument.activeLayer = duppedDocument.layers [duppedDocument.layers.length - 1]; to remove the

    setInvisibleAllArtLayers (duppedDocument);

    exportChildren (duppedDocument, app.documents [docName], exportInfo, duppedDocument, exportInfo.fileNamePrefix);

    duppedDocument.close (SaveOptions.DONOTSAVECHANGES);

    If (rememberMaximize! = undefined) {}

    app.preferences.maximizeCompatibility = rememberMaximize;

    }

    If (DialogModes.ALL == app.playbackDisplayDialogs) {}

    Alert (strTitle + strAlertWasSuccessful);

    }

    app.playbackDisplayDialogs = DialogModes.ALL;

    }

    } catch (e) {}

    If (DialogModes.NO! = app.playbackDisplayDialogs) {}

    Alert (e);

    }

    return to "Cancel"; quitting smoking, return "Cancel" (do not localize) makes the palette actions not to register our script

    }

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: settingDialog

    Use: pop of the UI and get the user settings

    Entry: object of exportInfo containing our settings

    Back: OK, the info in the dialog box is set to the exportInfo object

    ///////////////////////////////////////////////////////////////////////////////

    function settingDialog (exportInfo) {}

    return;

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: hideAllFileTypePanel

    Use: hide all panels in common stocks

    Entered: < none >, dlgMain is a global for this script

    Return: < any >, all the panels are now hidden

    ///////////////////////////////////////////////////////////////////////////////

    function hideAllFileTypePanel() {}

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: initExportInfo

    Use: create our default settings

    Entry: a new object

    Return: a new object with the default params

    ///////////////////////////////////////////////////////////////////////////////

    function initExportInfo (exportInfo) {}

    exportInfo.destination = new String (exportPath);

    exportInfo.fileNamePrefix = new String ("untitled_");

    exportInfo.visibleOnly = false;

    exportInfo.fileType = png24Index;

    exportInfo.icc = true;

    exportInfo.png24Transparency = true;

    exportInfo.png24Interlaced = false;

    exportInfo.png24Trim = true;

    try {}

    exportInfo.destination is Folder (new String (exportPath)) .fsName;. destination folder

    var tmp = app.activeDocument.fullName.name;

    exportInfo.fileNamePrefix = decodeURI (tmp.substring (0, tmp.indexOf("."))); part of the body filename

    } catch (someError) {}

    exportInfo.destination = new String (exportPath);

    exportInfo.fileNamePrefix = app.activeDocument.name; part of the body filename

    }

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: saveFile

    Use: the routine of work, take our params and save the file accordingly

    Entry: refers to the document, the name of the output file,

    export of information object containing more information

    Return: < any >, a file on disk

    ///////////////////////////////////////////////////////////////////////////////

    function saveFile (docRef, fileNameBody, exportInfo) {}

    saveFile (docRef, fileNameBody, exportInfo, false, true);

    function saveFile (docRef, fileNameBody, exportInfo, interlacedValue, transparencyValue) {}

    var id6 = charIDToTypeID ('Expr');

    var desc3 = new ActionDescriptor();

    7 var = charIDToTypeID ("Usng");

    var desc4 = new ActionDescriptor();

    id8 var = charIDToTypeID ("Op");

    id9 var = charIDToTypeID ('SWOp');

    var id10 = charIDToTypeID ("OpSa");

    Desc4.putEnumerated (id8, id9, id10);

    id11 var = charIDToTypeID ("Fmt");

    id12 var = charIDToTypeID ("IRFm");

    id13 var = charIDToTypeID ("PN24");

    Desc4.putEnumerated (id11, id12, id13);

    var id14 = charIDToTypeID ("Introduction");

    Desc4.putBoolean (id14, interlacedValue);

    id15 var = charIDToTypeID ("Trns");

    Desc4.putBoolean (id15, transparencyValue);

    id16 var = charIDToTypeID ("Mtt");

    Desc4.putBoolean (id16, true);

    var id17 = charIDToTypeID ("MttR");

    Desc4.putInteger (id17, 255);

    var id18 = charIDToTypeID ("MttG");

    Desc4.putInteger (id18, 255);

    id19 var = charIDToTypeID ("MttB");

    Desc4.putInteger (id19, 255);

    id20 var = charIDToTypeID ("SHTM");

    Desc4.putBoolean (id20, false);

    id21 var = charIDToTypeID ("SImg");

    Desc4.putBoolean (id21, true);

    id22 var = charIDToTypeID ("OHSA");

    Desc4.putBoolean (id22, false);

    var id23 = charIDToTypeID ("SSLt");

    var list1 = new ActionList();

    Desc4.putList (id23, list1);

    var id24 = charIDToTypeID ("DIDr");

    Desc4.putBoolean (id24, false);

    id25 var is charIDToTypeID ('In');.

    Desc4.putPath (id25, new file (exportPath + "C:/users/Tim/Desktop/decors/png /" + fileNameBody + ".png"));

    var delayed26 = stringIDToTypeID ('SaveForWeb');

    Desc3.putObject (7, delayed26, desc4);

    executeAction (id6, desc3, DialogModes.NO);

    }

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: zeroSuppress

    Use: return a string completed up to the figure (s)

    Entry: num to convert, the number of necessary digits

    Return: string padded all numbers

    ///////////////////////////////////////////////////////////////////////////////

    function zeroSuppress (num, number) {}

    var tmp = num.toString ();

    While (tmp.length < number) {}

    tmp = '0' + tmp;

    }

    return tmp;

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: setInvisibleAllArtLayers

    Use: Unlock and make invisible all the layers of art, recursively

    Entry: document or layerset

    Back: all layers of art are unlocked and invisible

    ///////////////////////////////////////////////////////////////////////////////

    function setInvisibleAllArtLayers (obj) {}

    for (var i = 0; i < obj.artLayers.length; i ++) {}

    obj.artLayers [i] .allLocked = false;

    obj.artLayers [i] .visible = false;

    }

    for (var i = 0; i < obj.layerSets.length; i ++) {}

    setInvisibleAllArtLayers (obj.layerSets [i]);

    }

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: removeAllInvisibleArtLayers

    Use: remove all layers invisible art, recursively

    Entry: document or layer set

    Return: < any >, all invisible layers are now gone

    ///////////////////////////////////////////////////////////////////////////////

    function removeAllInvisibleArtLayers (obj) {}

    for (var i = obj.artLayers.length - 1; 0 < = i; i--) {}

    try {}

    {if(!obj.artLayers[i].visible)}

    obj.artLayers [i] .remove ();

    }

    }

    {} catch (e)

    }

    }

    for (var i = obj.layerSets.length - 1; 0 < = i; i--) {}

    removeAllInvisibleArtLayers (obj.layerSets [i]);

    }

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: removeAllEmptyLayerSets

    Use: find everything empty layer sets and remove them, recursively

    Entry: document or layer set

    Return: empty layer sets are now gone

    ///////////////////////////////////////////////////////////////////////////////

    function removeAllEmptyLayerSets (obj) {}

    var foundEmpty = true;

    for (var i = obj.layerSets.length - 1; 0 < = i; i--) {}

    If (removeAllEmptyLayerSets (obj.layerSets [i])) {}

    obj.layerSets [i] .remove ();

    } else {}

    foundEmpty = false;

    }

    }

    If (obj.artLayers.length > 0) {}

    foundEmpty = false;

    }

    Return foundEmpty;

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: zeroSuppress

    Use: return a string completed up to the figure (s)

    Entry: num to convert, the number of necessary digits

    Return: string padded all numbers

    ///////////////////////////////////////////////////////////////////////////////

    function removeAllInvisible (docRef) {}

    removeAllInvisibleArtLayers (docRef);

    removeAllEmptyLayerSets (docRef);

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: exportChildren

    Use: find all the children in this document to record

    Entry: duplicate the original of the document, export info.

    Document reference, from file name

    Return: < any >, the documents are saved accordingly

    ///////////////////////////////////////////////////////////////////////////////

    function exportChildren (dupObj, orgObj, exportInfo, dupDocRef, fileNamePrefix) {}

    for (var i = 0; i < dupObj.artLayers.length; i ++) {}

    If (exportInfo.visibleOnly) {/ / only visible layer}

    If (! orgObj.artLayers [i] .visible) {}

    continue;

    }

    }

    dupObj.artLayers [i] .visible = true;

    var NomCouche = dupObj.artLayers [i] .name;  store the name of the layer before change doc

    var duppedDocumentTmp = dupDocRef.duplicate ();

    If ((png24Index == exportInfo.fileType) |) (png8Index is exportInfo.filetype)) {/ / PSD: maintain transparency}

    removeAllInvisible (duppedDocumentTmp);

    PNGFileOptions

    If (activeDocument.activeLayer.isBackgroundLayer == false) {//is it something other than a background layer?}

    app.activeDocument.trim (TrimType.TRANSPARENT);

    }

    } else {/ / all flatten}

    duppedDocumentTmp.flatten ();

    }

    Edit

    var Nomdoc = app.activeDocument.name;

    For some reason any indexOf fails if we include the '-', so we use 'copy' and decrement the index of 1.

    docName = docName.slice (0, docName.indexOf('copy')-1);

    var fileNameBody = (docName + '_' + layerName) .toLowerCase ();

    fileNameBody = fileNameBody.replace (/ [:------/------* \? \ "\ <>\ \ |"]) /g, "_");  // '/\:*?" <> |' -> « _ »

    If {(fileNameBody.length > 120)

    fileNameBody = fileNameBody.substring (0.120);

    }

    saveFile (duppedDocumentTmp, fileNameBody, exportInfo);

    duppedDocumentTmp.close (SaveOptions.DONOTSAVECHANGES);

    dupObj.artLayers [i] .visible = false;

    }

    for (var i = 0; i < dupObj.layerSets.length; i ++) {}

    If (exportInfo.visibleOnly) {/ / only visible layer}

    If (! orgObj.layerSets [i] .visible) {}

    continue;

    }

    }

    var fileNameBody = fileNamePrefix;

    fileNameBody += '_' + zeroSuppress (i, 4) + "s";

    exportChildren (dupObj.layerSets [i], orgObj.layerSets [i], exportInfo, dupDocRef, fileNameBody);  recursive call

    }

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: objectToDescriptor

    Use: create an ActionDescriptor of a JavaScript object

    Entry: JavaScript Object (o)

    unique chain of the object (s)

    Pre process converter (f)

    Return: ActionDescriptor

    NOTE: Only, boolean, string, number and UnitValue are supported, use a pre processor

    to convert other types (f) to one of these forms.

    REUSE: This routine is used in other scripts. Please update those if you

    change. I'm not include using or eval statements that I want these

    stand-alone scripts.

    ///////////////////////////////////////////////////////////////////////////////

    function objectToDescriptor (o, s, f) {}

    o = {};

    var d = new ActionDescriptor;

    var l = o.reflect.properties.length;

    d.putString (app.charIDToTypeID ('Msge"), s);

    for (var i = 0; i < l; i ++) {}

    var k = o.reflect.properties [i] m:System.NET.SocketAddress.ToString ();

    If (k == '__proto__' | k == '__count__' | k == '__class__' | k == 'reflect')

    continue;

    var v = o [k];

    k = app.stringIDToTypeID (k);

    Switch (typeof (v)) {}

    case 'boolean ':

    d.putBoolean (k, v);

    break;

    case "string":

    d.putString (k, v);

    break;

    case 'number ':

    d.putDouble (k, v);

    break;

    by default:

    {

    If (v instanceof UnitValue) {}

    UC var = new Object;

    UC ["px"] = charIDToTypeID ("#Rlt"); unitDistance

    UC ["%"] = charIDToTypeID ("#Prc"); unitPercent

    d.putUnitDouble (k, uc [v.type], v.value);

    } else {}

    throw (new Error ("Unsupported type in objectToDescriptor" + typeof (v)));

    }

    }

    }

    }

    return d;

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: descriptorToObject

    Use: updating a JavaScript from an ActionDescriptor object

    Entry: JavaScript Object (o), current to update object (output)

    Photoshop ActionDescriptor (d), descriptor shoot again for object params of

    unique chain of the object (s)

    JavaScript function (f), position the utility of conversion process

    Back: Nothing, update is applied to spent in JavaScript Object (o)

    NOTE: Only, boolean, string, number and UnitValue are supported, use a post-processor

    to convert other types (f) to one of these forms.

    REUSE: This routine is used in other scripts. Please update those if you

    change. I'm not include using or eval statements that I want these

    stand-alone scripts.

    ///////////////////////////////////////////////////////////////////////////////

    function descriptorToObject (o, d, f, s) {}

    var l = d.count;

    If {(l)

    var keyMessage = app.charIDToTypeID ("Msge");

    If (d.hasKey (keyMessage) & & (s! = d.getString (keyMessage))) return;

    }

    for (var i = 0; i < l; i ++) {}

    var k = d.getKey (i); // i + 1 ?

    var t = d.getType (k);

    STRK = app.typeIDToStringID (k);

    switch (t) {}

    case DescValueType.BOOLEANTYPE:

    o [strk] = d.getBoolean (k);

    break;

    case DescValueType.STRINGTYPE:

    o [strk] = d.getString (k);

    break;

    case DescValueType.DOUBLETYPE:

    o [strk] = d.getDouble (k);

    break;

    case DescValueType.UNITDOUBLE:

    {

    UC var = new Object;

    UC [charIDToTypeID ("#RLT")] = "px"; unitDistance

    UC [charIDToTypeID ("#PRC")] = '% '; unitPercent

    UC [charIDToTypeID ("#pxl")] = "px"; unitPixels

    UT var = d.getUnitDoubleType (k);

    var uv = d.getUnitDoubleValue (k);

    o [strk] = new UnitValue (uv, uc [ut]);

    }

    break;

    case DescValueType.INTEGERTYPE:

    case DescValueType.ALIASTYPE:

    case DescValueType.CLASSTYPE:

    case DescValueType.ENUMERATEDTYPE:

    case DescValueType.LISTTYPE:

    case DescValueType.OBJECTTYPE:

    case DescValueType.RAWTYPE:

    case DescValueType.REFERENCETYPE:

    by default:

    throw (new Error ("Unsupported type in descriptorToObject" + t));

    }

    }

    If (undefined! = f) {}

    o = f (o);

    }

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: preProcessExportInfo

    Usage: Convert Photoshop enums to strings for storage

    Entry: Object of JavaScript of my parameters for this script

    Return: Object of JavaScript with objects converted for storage

    ///////////////////////////////////////////////////////////////////////////////

    function preProcessExportInfo (o) {}

    o.tiffCompression = o.tiffCompression.toString ();

    o.pdfEncoding = o.pdfEncoding.toString ();

    o.targaDepth = o.targaDepth.toString ();

    o.bmpDepth = o.bmpDepth.toString ();

    Return to o;

    }

    ///////////////////////////////////////////////////////////////////////////////

    Function: postProcessExportInfo

    Usage: convert strings in destocking Photoshop enums

    Entry: Object of my parameters a string JavaScript

    Return: Object of JavaScript with objects in the form of enum

    ///////////////////////////////////////////////////////////////////////////////

    function postProcessExportInfo (o) {}

    o.tiffCompression = eval (o.tiffCompression);

    o.pdfEncoding = eval (o.pdfEncoding);

    o.targaDepth = eval (o.targaDepth);

    o.bmpDepth = eval (o.bmpDepth);

    Return to o;

    }

    ///////////////////////////////////////////////////////////////////////////

    Function: StrToIntWithDefault

    Usage: convert a string to a number, first depriving all the characters

    Input: a string and a number of default

    Return: a number

    ///////////////////////////////////////////////////////////////////////////

    function StrToIntWithDefault (s, n) {}

    var onlyNumbers = / [^ 0-9] / g;

    var t is SS. Replace (onlyNumbers, "");

    t = parseInt (t);

    If (! isNaN (t)) {}

    n = t;

    }

    return n;

    }

    End X2L.jsx

    The exportPath variable is what you want to change to the beginning. It should read:

    var exportPath = "~/Desktop/Backdrops/png/";
    exportPath = exportPath + '/layers';//Get rid of this
    

    The line you mentioned above should be:

    desc4.putPath( id25, new File( exportPath + fileNameBody + ".png") );
    

    Again, you must be logged in as 'Tim' to access folder of the user. If you're not, you must run the script as an administrator, and then specify the entire path.

  • Can I export layers PSD PSD files as I could do in ImageReady 2?

    Hi people,

    I've been chasing this layer of export Nirvana for a couple of years now, but I got nowhere.

    In ImageReady 2 I could import a PSD file and export layers with exactly the name that I used for each layer (with no annotations, prefixes or suffixes), with the size of entire file (not cropped at the edge of the image) to the PSD format.

    The script in Photoshop adds locate file name that I don't see how to disable.

    I tried a few free (SciptsRus) and commercials (Ferry) but they don't seem to work with my version of Photoshop (Mac OS X 10.7.4 of CS5). Is it a result the recent updates to Javascript with Mac OS X 10.7? I'll contact the authors of these scripts then and see what they say.

    I tried a program called PC layer Super which exports to the PNG files and was almost what I wanted except that it cropped to the size of the file to the size of the image. I could get away with it I guess that if I copied a single pixel of 1% in each corner of the file, but it would be a lot of time for all layers, I need to export (500-600) and means I have rasterized text layers, which is also double treatment.

    I even tried Graphic Converter on a Mac, but cannot get this to work completely. I find myself with strong white funds and without transparency.

    All I want is to open a PSD (preferably on Mac OS) file and export each layer at the same size on a transparent background with just the name of the layer as name of file as a PSD file. I'm alos agree. PNG format, so as long as I get transparency and full file size. Just as we do with effeiciency brilliant with ImageReady CS2. I actually kept an old version of ImageRady on my PC for this, but surely in the 21st century, there is a way around this?

    Many thanks in anticipation for any help offered.

    Sorry to hear that you have problems with some of the scripts. Normally, it's because of the corrupt becoming prefferences. They can be trashed to see if all the, then works...

    http://forums.Adobe.com/thread/375776

    I have also written a new script yesterday that includes layers of settings if exist it, so that may work for you?

    http://www.scriptsrus.TalkTalk.NET/LSA.htm

    It will be useful.

  • Layer Comps in layers

    I watch a few videos of Adobe and each seems to stop just where I need to go.

    (layers in layer comps may be confusing, so I'll try to do it is as simple as possible!)

    (A)

    I have a PSD that has 20 layers composed of 20 LINKED PSDs (1920 x 1080).

    (each layer 20 make up a Storyboard for a film table)

    (B)

    I have a second PSD is 3000 x 2000

    (this is a movie theater scene that fits the psd 'A' to fill the screen, 1920 x 1080, centered at 3000 x 2000 with theatre scene).

    I want to copy / reproduce compositions of layers of 'A' to 'B '.

    PSD > "has".

    A_layercomp_01 (scene_01.psd)

    A_layercomp_02 (scene_02.psd)

    A_layercomp_03 (scene_03.psd)

    ... well now

    PSD > 'B '.

    B_layercomp_01 (A_layercomp_01)

    B_layercomp_02 (A_layercomp_02)

    B_layercomp_03 (A_layercomp_03)

    ... well now

    The psd 'A' must be updated several times.

    I would like to make changes to the "one" the psd (1920 x 1080) and they reflect in the psd 'B' (3000 x 2000) without having to export JPEG/PNG files for the theatrical stage.

    Whenever I change the drop-down list of PROPERTIES, it does not save the State.

    what Miss me?

    Thanks in advance.

    If I understand your question, then it is possible to work in this way and everything works fine. If you have a and B documents are open in Photoshop as separate files and image file has change/swap > Comp 5 using replace content command (or link back to the file) and then save the changes it will be reflected in document B immediately if this model (for example 5) is selected in the properties panel.

    I test on the latest version of Photoshop: CC 2015.0.1.

Maybe you are looking for