4 Replies Latest reply on Nov 25, 2012 9:53 PM by SG...

    Start with ordinary layer and not a background layer

    steenmikkelsen2 Level 1
      Every time I import / open a new image in Photoshop CS5 will be provided automatically to a background layer. Is it possible to change it so that the layer is a common and editable layers from the start?
      Photoshop layer.jpg


        • 1. Re: Start with ordinary layer and not a background layer

          This has always annoyed me. Unfortunately, I don't know of a way to change it by default.


          For anyone that doesn't already know, I should mention that you can right-click on the background layer and select "Layer From Background...". This will convert the background layer to a regular layer, but that's not quite what steenmikkelsen2 is talking about here.

          • 2. Re: Start with ordinary layer and not a background layer
            Paul Riggott Level 6

            Here is one option you could use...

            Save the script into the Application Presets\Scripts\Event Scripts Only folder

            Then setup

            File - Scripts - Script Event Manager to run the script on new/open document.



            function layerFromBackground() {
            var desc2 = new ActionDescriptor();
            var ref2 = new ActionReference();
            ref2.putProperty( charIDToTypeID('Lyr '), charIDToTypeID('Bckg') );
            desc2.putReference( charIDToTypeID('null'), ref2 );
            var desc3 = new ActionDescriptor();
            desc3.putUnitDouble( charIDToTypeID('Opct'), charIDToTypeID('#Prc'), 100.000000 );
            desc3.putEnumerated( charIDToTypeID('Md  '), charIDToTypeID('BlnM'), charIDToTypeID('Nrml') );
            desc2.putObject( charIDToTypeID('T   '), charIDToTypeID('Lyr '), desc3 );
            try{ executeAction( charIDToTypeID('setd'), desc2, DialogModes.NO ); }catch(e){}
            • 3. Re: Start with ordinary layer and not a background layer
              JJMack Most Valuable Participant

              Photoshop open an image file as it is.  If the file you open is a Jpeg file it will open as a background layer. For that is all the jpeg file format supports. Jpeg format does not support transparency or layers just a background.  If you have document open with an ordinary layer it can contain transparence even if there are not completely transparent pixels opacity can be less the 100%.  If you save this document as a Jpeg image it will be saved as a Background layer in the jpeg file.  For a Background Layer does not support transparency and pixels are 100% opaque a solid color.  Photoshop has no problem opening image files that dont have a background layer. For example PNG and PSD may not have a background layer Photoshop will open them and the resulting document will not have a background layer. 


              You can more or less do what you want by either opening Jpeg File through ACR as smart object layers or set up a script event manager open event to run a script that will convert a background layers to a normal layer.


              // A Photoshop Script by JJMack's used by Photo Corners Action
              // This script targets the bottom layer and makes sure it a normal layer.
              // This script is supplied as is. It is provided as freeware. 
              // The author accepts no liability for any problems arising from its use.
              <about>$$$/JavaScripts/ConvertBackground/About=JJMack's ConvertBackground.^r^rCopyright 2009 Mouseprints.^r^rScript utility for action.^rNOTE:Convert Background to normal layer if there is one!</about>
              <category>JJMack's Action Utility</category>
              // enable double-clicking from Mac Finder or Windows Explorer
              #target photoshop // this command only works in Photoshop CS2 and higher
              // bring application forward for double-click events
              // ensure at least one document open
              if (!documents.length) {
                        alert('There are no documents open.', 'No Document');
              // if at least one document exists, then proceed
              else {
              // main - main function
              function main() {
                        try {
                                  // declare local variables
                                  var layers = activeDocument.layers;
                                  activeDocument.activeLayer = layers[layers.length-1]; // Target Bottom Layer
                                  activeDocument.activeLayer.isBackgroundLayer=0; // Make it a normal Layer
                        // display error message if something goes wrong
                        catch(e) { alert(e + ': on line ' + e.line, 'Script Error', true); }
              • 4. Re: Start with ordinary layer and not a background layer
                SG... Adobe Employee



                And to just pile on, here's a post from Julieanne Kost on the Script Event Manager method:



                "Installing the OpenAsLayerNoExtension.jsx script will allow you to open a file and have Photoshop CS5 automatically promote the background into a layer AND rename that layer the same as the file name (without the extension). This script works for the Open command, opening  files through Bridge and Adobe Camera Raw. Special thanks to Thomas Ruark at Adobe for creating and sharing this script!"