Save Selected Layers (started in general photoshop forum)

So this is a continuation of the thread started in the general photoshop forum about exporting layers.
Michael Hale  responded to that post...
Thanks! Those were helpful tips.  I have another question that may not be as easy...
I have a top layer that I want to serve as a border for all the other layers.  Is there a way to automate that? So that it save every layer individually with the top layer?
Thanks

Well this might need some fine tuning but it will save each layer with the top(border) layer as a jpg in the same folder as the document using the layer's name as the filename.
// refence to selected document
var doc = app.activeDocument;
// path to doc
var saveFolder = doc.path;
// referece to top layer
var borderLayer = doc.layers[0];
// make top layer the active layer
doc.activeLayer = borderLayer;
// hide all the other layers
hideOtherLayers();
// loop remaining layer and save each with border
for( var i = 1; i < doc.layers.length; i++ ){
   // reference the layer
   var current = doc.layers[i];
   // turn on the layer
   current.visible = true;
   // save the layer with border
   saveAsJPG( new File( saveFolder+'/'+current.name+'.jpg'), 8 );
   // turn off layer
   current.visible = false;
   // next layer
function hideOtherLayers(){//activeLayer
    var desc = new ActionDescriptor();
            var ref = new ActionReference();
            var list = new ActionList();
            ref.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
        list.putReference( ref );
    desc.putList( charIDToTypeID( "null" ), list );
    desc.putBoolean( charIDToTypeID( "TglO" ), true );
     executeAction( charIDToTypeID( "Shw " ), desc, DialogModes.NO );
function saveAsJPG( saveFile, jpegQuality ){
     jpgSaveOptions = new JPEGSaveOptions();
     jpgSaveOptions.embedColorProfile = true;
     jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
     jpgSaveOptions.matte = MatteType.NONE;
     jpgSaveOptions.quality = jpegQuality;
     activeDocument.saveAs( saveFile, jpgSaveOptions, true,Extension.LOWERCASE );

Similar Messages

  • Help!  Photoshop save selection got corrupted; help me fix

    My copy of Photoshop is saving an inverse mask in Channels when I use "Selection>Save Selection", whereas it saves the standard mask in Channels when I save the selection using the mask button in the Channels Panel. 
    I noticed that my other install of Photoshop saves the same result by both methods.
    How do I repair Photoshop so that it doesn't invert selections when using "Selection>Save Selection"?

    Try resetting the prefs by reading this:
    http://forums.adobe.com/thread/375776?tstart=0

  • How to identify selected layers in layer panel of Photoshop?

    Hi everyone,
    I'm working on a Photoshop plug-in, and I want to identify selected layers in layer panel.
    As I tested so far, didn't came up with a solution..
    If anyone can provide me a solution it will be greatly appreciated,
    Thanks in advanced..
    Nuwan.

    Looping through controls is indeed a inefficient way of doing what you want!
    With such a great number of controls, you could assign an appropriate callbackData to each of them when loading the panel. Next you could create an array of control IDs with all the LEDs and operate in the switch callback to turn on and off the corresponding led. A small example will be more clear:
    At panel load:
    int leds[200];
    SetCtrlAttribute (panelHandle, PANEL_SWITCH1, ATTR_CALLBACK_DATA, (void *)1); leds[1] = PANEL_LED1;
    SetCtrlAttribute (panelHandle, PANEL_SWITCH2, ATTR_CALLBACK_DATA, (void *)2); leds[2] = PANEL_LED2;
    SetCtrlAttribute (panelHandle, PANEL_SWITCH192, ATTR_CALLBACK_DATA, (void *)192); leds[192] = PANEL_LED192;
    In the switch callback:
    int CVICALLBACK switchOnOff (int panel, int control, int event,
    void *callbackData, int eventData1, int eventData2)
    int sts;
    if (event != EVENT_COMMIT) return 0;
    // Get the status of the switch
    GetCtrlVal (panel, control, &sts);
    // Set the led to the proper status
    SetCtrlVal (panel, leds[(int)callbackData], sts);
    return 0;
    For this solution to work, leds[] array must be global so that it is available to the control callback.
    An additional improvement could be to modify the panel loading so that swithces and leds are created programmatically. You could have a single switch/led pair set in the UIR editor and next have a loop that duplicate the controls, sets callbackData and loads the array of led ids.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Cannot export layers to files in Photoshop Elements 12

    The menu options export and export creations are both disabled / greyed out. I'm trying to save multipule layers to files.
    Please assist.
    FYI: Windows 7 64 bit, no scanner attached, installed optional twain plugin from C:\Program Files (x86)\Adobe\Photoshop Elements 12\optional plug-ins... no change.
    Do I really need a scanner to export multiple layers to files? Do I really need to save each layer to a file manually?

    You also might try this script to export Layers to Files
    https://workspaces.acrobat.com/?d=blJVJ4ZFfR7dRg24q-mBbQ
    (use this link instead of the no longer active one in the post below to download the Layers to Files.zip)
    http://forums.adobe.com/message/4186187#4186187
    Unzip the Layers to Files.zip and then copy the Export Layers to Files.jsx
    to
    C:\Program Files (x86)\Adobe\Photoshop Elements 12\Presets\Scripts
    Then after starting or restarting the pse 12 editor, the script should show under File>Automation Tools>Export Layers to Files

  • Welcome window problem.  appears every time i save and close a file of photoshop

    How to fix a bug regarding welcome window. this window appears every time i save and close a file of photoshop, its started after the last update 2014.2.0

    See this document: Troubleshoot Welcome Screen in Photoshop
    Scroll all the way down to the bottom. There's a check box "Don't Show Welcome Screen Again"
    You can relaunch the screen at a later date by selecting Help>Welcome Screen...
    ~ Arpit

  • Batch rename selected layers

    I'm trying to find a script that can help batch rename/renumber a group of selected layers.
    So far I've been able to find a script that renames every single layer in a Photoshop document (overkill). Or there's the CS6 Tab rename trick (too slow).
    I routintely export PSDs from Illustrator for use in After Effects. But in Photoshop, I'll get a couple hundred layers named <path> or <path> + <path> or <group>. Renaming by hand is out of the question. But I don't want to rename every layer the same.
    Any suggestions?

    I wrote one for you here...
    http://www.retouchpro.com/forums/photoshop-scripting/23234-script-find-replace-text-layer- names.html

  • The "save selection as channel" options don't stick

    In PS CS5, I can't get the settings for the "Save selection as channel" options to stick.
    My saved selections always starts out as black for the selected area although the small icon at the bottom of the channels panel shows a white circle on a black background. When I click the channel thumbnail to bring up the settings dialog it's always set to "Color indicates selected areas". Of course I can change it, but I would like the setting to remain on the "Color indicates masked areas". Is there a setting somewhere that has eluded me?
    Thanks for any help.

    OK, when I posted my question I saw the "more like this" sidebar, in which I found the answer : the settings for Quick Mask are used as defaults. So my question is answered. I had searched the forums before posting but hadn't found anything.

  • Adobe Photoshop Forums

    From what I read many who upgraded Photoshop just to get the latest version of ACR are not willing to be trapped in Adobe Cloud. Now it seems that new camera support will be made available to these users via a dumb down version of ACR 8 that is in Adobe Cloud for Photoshop CS6. That Photoshop CS6 will continued to be available for the foreseeable future.
    Given this it may be appropriate time to start a new forum on Adobe forum web site. So there are Photoshop Forums for the different user groups where the dumb down version can be discussed.
    Photoshop Elements, Photoshop Perpetual and Photoshop Clouded…

    I for one do not want to leave but I need a place to hang around in.  My head is not in the cloud in fact I want no part of it.  That is why I suggested  splitting off a Photoshop Perpetual forum.  As Photoshop evolves in the cloud files save with the clouded version will not be useable in CS6.  The clouded versions UI and features will also change.  CS6 as it stands is not backwards compatible and of course is not forward compatible with the cloud.   So like Elements is a different product them Photoshop.  Photoshop CS6 is a different product then Photoshop CC. 
    Many of the features in Photoshop CC are Photoshop extended features that not needed for digital photography.  If I wanted to get into Video I would be looking at the cloud for Adobe Premiere Pro and after effects. Doing video well is hard work.  If I were looking for 3d I be looking at Autodesk 3D Max but after looking at Blender and Sketchup 3D is too much like work.  I'm retired don't want to work and I derive no income from using Photoshop.  Adobe does not want users like me they want cash flowing in at all times from all their users. So their user also need cash flowing in as well.  Older retired folks have fixed incomes and some savings. Cash flows out faster and faster because of inflation.  Gas, oil, electricity and other essentials like food are constant drains that can not be avoided.   The Adobe cloud is not a drain I want sucking away at my resources. So I will forego Adobe Cloud like many others will do.
    Adobe own product  support is very poor.  The best Adobe product support come from usere in forums like this one.  That is why I want a  Photoshop Perpetual forum.

  • Hi, I'm designing my 1st website and I started it in  photoshop cs5.5. I know that it's bad practice

    Hi, I'm designing my 1st website and I started it in  photoshop cs5.5. I know that it's bad practice to build with images, I learned this too late. I imported my site into Dreamweaver cs5.5 and uploaded it to my server. The problem I'm having is that I want to apply a jquery drop down menu bar but whenever I try, I get white gaps within my page. How do I convert the coding into a functioning site?*Help Please*  The URL to my site is: http://www.coriemoment.com and this is my coding:
    <html xmlns="http://www.coriemoment.com"
    <head>
    <title>The Official Corie Moment Home</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
        <div id="=container"
    <body bgcolor="#FFFFFF" leftmargin="auto" topmargin="auto" marginwidth="auto" marginheight="auto" margin:0;>
    <!-- Save for Web Slices (home.psd) -->
    <table id="Table_01" width="1281" height="768" border="0" cellpadding="0" cellspacing="0">
              <tr>
                        <td colspan="6">
                                  <img src="images/index_01.png" width="1280" height="220" alt=""></td>
                        <td>
                                  <img src="images/spacer.gif" width="1" height="220" alt=""></td>
              </tr>
              <tr>
                        <td rowspan="4">
                                  <img src="images/index_02.png" alt="" width="414" height="548"></td>
                        <td rowspan="3">
                                  <object width="564" height="423"><param name="movie" value="http://www.youtube.com/v/XbuQiJ6Sv_M?hl=en_US&version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/XbuQiJ6Sv_M?hl=en_US&version=3" type="application/x-shockwave-flash" width="564" height="423" allowscriptaccess="always" allowfullscreen="true"></embed></object></td>
                        <td colspan="3">
                                  <img src="images/index_04.png" width="255" height="89" alt=""></td>
                        <td rowspan="4">
                                  <img src="images/index_05.png" width="46" height="548" alt=""></td>
                        <td>
                                  <img src="images/spacer.gif" width="1" height="89" alt=""></td>
              </tr>
              <tr>
                        <td rowspan="2">
                                  <img src="images/video_03-07.png" width="1" height="336" alt=""></td>
                        <td rowspan="3">
                                  <img src="images/index_07.png" width="34" height="459" alt=""></td>
                        <td>
                                  <script src="http://widgets.twimg.com/j/2/widget.js"></script>
    <script>
    new TWTR.Widget({
      version: 2,
      type: 'search',
      /*put your twitter id that people use to reply to you below. Mine is mhorning. If you only want to see the Tweets that you have Tweeted, then delete the part below that says- OR to:coriemoment */
      search: 'from:coriemoment OR to:coriemoment',
       /*this is the duration in terms of seconds*/
      interval: 30000,
       /*this is the title you want on your tweets*/
      title: 'Corie Tweets',
      subject: 'Send us your comments',
       /*setting width to 'auto' will adjust the width of your tweetbox to whatever is set on your div. You can change this to something like 500px if you want*/
      width: 'auto',
      height: 212,
      theme: {
        shell: {
                 /*this will change the background color of your tweetbox. It is currently yellow*/
                background: 'body p, body img, body embed, body object, body video{opacity:1 !important}',
          /*this will change the color of the text in your background*/
                color: 'fac935'
        tweets: {
                 /*this will change the background color behind your tweets. It is currently white*/
                background: 'body p, body img, body embed, body object, body video{opacity:0.2 !important}',
           /*this will change the color of the text in your tweets. It is currently black*/
                color: '#000000',
           /*this will change the color of anything that is hyperlinked in your tweet. It is currently blue*/
                links: '#1985b5'
      features: {
        scrollbar: false,
        loop: true,
        live: true,
        behavior: 'default'
    }).render().start();
    </script></td>
                        <td>
                                  <img src="images/spacer.gif" width="1" height="302" alt=""></td>
              </tr>
              <tr>
                        <td rowspan="2">
                                  <img src="images/index_09.png" width="220" height="157" alt=""></td>
                        <td>
                                  <img src="images/spacer.gif" width="1" height="34" alt=""></td>
              </tr>
              <tr>
                        <td colspan="2">
                                  <img src="images/index_10.png" width="566" height="123" alt=""></td>
                        <td>
                                  <img src="images/spacer.gif" width="1" height="123" alt=""></td>
              </tr>
    </table>
    <!-- End Save for Web Slices -->
    </body>
    </html>

    mazz2000 wrote:
    The best way to do it is go back to PS and place the navigation area in the design, i would make it 100% of the width and then re-slice the design making sure one single slice is the whole of this navigation area.
    That would be the best way to do it while still using a table layout which in and of itself is not recommended, in large part  for this very reason.
    Every time you want to make a small change to the layout of your site, it will require re-slicing and re-generating code out of PS. You would be much better off taking the time to understand css layouts. Here is a good place to start to get the basics of css: http://www.w3schools.com/css

  • Updated to Oct 2014 version of photoshop CC. since that time cannot save ANY work.  I can work on files but when I hit 'save as" every time it says "photoshop has quit working and needs to close."

    Updated to Oct 2014 version of photoshop CC. since that time cannot save ANY work.  I can work on files but when I hit 'save as" every time it says "photoshop has quit working and needs to close." Need solution now.

    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Photoshop Album Starter Edition to Photoshop 7.0

    How can I export photos from Photoshop Album Starter Edition to Photoshop 7.0?

    The pictures are there on your hard drive.
    Photoshop 7  does not "import" pictures – you open them when you want to edit them.
    In case you meant Photoshop Elements  7.0, there is a thing called the Organizer.
    For Starter Edition questions ask here: PS Album Starter forum.
    For Elements questions ask here: Elements forum.

  • Selecting browse in bridge in photoshop 2014 launches CC applet, what is happening?

    I have updated my system with the new Creative Cloud Application (Lightroom 5.5, Photoshop 2014 and latest Bridge)  Now I am getting all sorts of errors.
    At first I could use Edit in Photoshop 2014 command in Lightroom and the image would open in Photoshop, however after doing a few edits neither save or save as would work - all I got was a long involved error message. After a bit of investigation I removed Lightroom from the system and re-installed using the CC applet.  Now when I try to Edit in Photoshop 2014 Photoshop 2014 opens but the picture I want to edit has not passed accross ata all.
    I then had a try at using Bridge.  I selected Browse in Bridge from Photoshop 2014 and instead of Bridge I got the Adobe CC Applet pop up offering to update Bridge (which was up to date anyway) and warning me about loosing settings if I did.  I updated Bridge and then updates for Lightroom and Photoshop 2014 were offered which I installed.  These have not made a blind bit of difference I still can't pass pictures from Lightroom to Photoshop and still can't open Bridge from Photoshop - it's still opening the CC applet.
    Any suggestions on how to resolve this would be greatly appreciated.
    Dave

    The answer seems to be to uninstall the Adobe CC applet and then re-install it again (while I was doing that I re-installed Photoshop 2014).  All is working correctly now.

  • Save selection criteria in payment wizard

    Hello,
    Does anyone know what the option 'Save selection criteria only' at the end of the payment wizard actually means?  Does it mean it will save the criteria you choose e.g selecting a specific property and BP group or does it mean it will save the results returned from your selection criteria the previous time you ran it?
    Many thanks,
    Kate

    Hi Gordon,
    I thought the same however when I tested this it did not seem to work in this way.  I selected property 6 which returned one business partner which was correct and when I got to the last step of the payment wizard i chose 'Save selection criteria only'.  I then went into the BP master data record of a different supplier and ticked property 6.  When I went back into the payment wizard and went through the one I had just saved, the second business partner was not displayed.  If i then start a new payment run and choose property 6 in the selection criteria, both suppliers were shown.  It seems to only be saving the results that it returns from the selection criteria rather than the selection criteria itself.
    Kind regards,
    Kate

  • IDCS5: How to access selected layers in layer panel

    It seems the way to access the selected layers in layer panel has been changed in CS5.
    Here is a link to the code that worked with CS4, but it is not working on CS5.
    http://forums.adobe.com/message/1304622#1304622
    Is there some way to find out how it works in CS5?
    Thanks.

    Please check Panel Options > Thumbnail Size from the Layers Panel’s pop-up menu in the upper right corner.

  • Layers palette disappears in photoshop cs5

    My layers palette disappears in photoshop cs5 (64 bit and 32) any time I click on another tab such as histogram or info. It also disappears after PS opens and CS live starts. The layers tab is still there but the layers themselves go away. I can get them back by clicking on the tab. A minor problem but is starting to get real aggravating as it disrupts workflow. I tried Ctrl+alt to reset. Doesn't help. Uninstalled Creative Suite Production Premium CS5 with the remove preference box checked at least 8 times as well as using the Adobe Creative Suite cleaner tool. I have gone as far as removing EVERYTHING Adobe on my machine and deleting every adobe reference in the registry, every file with the Adobe name on it. If it had Adobe on it it was deleted.Cleaned and defraged the drives and registry. My Premiere Pro also has problems with the start up screen. I just cannot get a clean install of CS5 no matter what I have done, short of wiping my hard drive. Any ideas?
    Adobe Creative Suite Design Premium CS4 (Only DW, FW and ID installed)
    Adobe Creative Suite Production Premium CS5
    Windows Vista sp2 (64bit)
    8 gigs ram
    Thanks.

    What do you have set for Animation Options?
    -Noel

Maybe you are looking for

  • How can i add my itunes library to my iphone?

    how can I add my itunes library to my iphone. when i sync no music is added?

  • Transmitting message to entry pipeline failed !!

    Hi all, We have configured a <b>file adapter</b> to poll a specific directory. Now the adapter polls the file , deletes it after reading it , however it fails to deliver the message to entry pipeline. We are getting an error msg that reads: <b>Transm

  • Access Point AP11B

    Hello I meet with a wireless for the first time.I want to connect to an infrastucture wireless network.BUT I don't know how to do it.In the manual I couldn't find anything about how to do it.I have the AP11B.Please help me, what I need to do to see t

  • I have Photoshop Elements 10 and cant start my Epson Scanner in the profesjonell way only automatic.

    I cant start my Photoshop Elements 10 to use my Epson Scanner in the profesjonell way only automatic.

  • Another Scrabble Bug

    When the iPod is connected to an external speaker, For example, a Bose external amplifier/speaker for the iPod, switching music "off" actually turns the music off. This is good. Um, not so with EA Scrabble for the iPod. When it plays its (annoying) b