Saving adjustment layers with layer mask

Hello -
I need to be able to save a curves adjustment layer WITH its layer mask.
I have written a longish automatic applescript to process image files that are all identical in pixel dimension. Part of the script relies on Photoshop, where a number of actions take place. In one of the Photoshop actions, I need to load an adjustment layer with a precise layer mask. I realize that if a layer mask file is open I could write an action to load a selection from that file, but I very much want to avoid keeping a second file open, or forcing PS to open and close that file.
Is there a simple way to "load" a layer mask into an adjustment layer?
Thanks,
- M

Maybe you could do something like this...
if(documents.length){
CurveLayer();
colourMask();
function colourMask(){
selectMask(true);
var black = new SolidColor();
black.rgb.hexValue = '000000';
var Width = activeDocument.width.as('px');
var Height = activeDocument.height.as ('px');
var stripWidth = Width/12;
var Left = 0;
var Top = 0;
var Right =stripWidth;
var Bottom = Height/2;
for (var a =0;a<12;a++){
    activeDocument.selection.select([[Left,Top],[Right,Top],[Right,Bottom],[Left,Bottom]], SelectionType.REPLACE, 0, false);
   if( a % 2) activeDocument.selection.fill(black);
    Left +=stripWidth;
    Right +=stripWidth;
var Left = 0;
var Top = Height/2;
var Right =stripWidth;
var Bottom = Height;
for (var a =0;a<12;a++){
    activeDocument.selection.select([[Left,Top],[Right,Top],[Right,Bottom],[Left,Bottom]], SelectionType.REPLACE, 0, false);
   if(a % 2){}else{ activeDocument.selection.fill(black);}
    Left +=stripWidth;
    Right +=stripWidth;
activeDocument.selection.deselect();
selectMask(false);
function CurveLayer() {
    var desc3 = new ActionDescriptor();
        var ref1 = new ActionReference();
        ref1.putClass( charIDToTypeID('AdjL') );
    desc3.putReference( charIDToTypeID('null'), ref1 );
        var desc4 = new ActionDescriptor();
            var desc5 = new ActionDescriptor();
            desc5.putEnumerated( stringIDToTypeID('presetKind'), stringIDToTypeID('presetKindType'), stringIDToTypeID('presetKindDefault') );
        desc4.putObject( charIDToTypeID('Type'), charIDToTypeID('Crvs'), desc5 );
    desc3.putObject( charIDToTypeID('Usng'), charIDToTypeID('AdjL'), desc4 );
    executeAction( charIDToTypeID('Mk  '), desc3, DialogModes.NO );
function selectMask(BOOL) {
    var desc184 = new ActionDescriptor();
        var ref84 = new ActionReference();
        ref84.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Msk ') );
    desc184.putReference( charIDToTypeID('null'), ref84 );
    desc184.putBoolean( charIDToTypeID('MkVs'), BOOL );
    executeAction( charIDToTypeID('slct'), desc184, DialogModes.NO );

Similar Messages

  • PS Elements 10 Layers and Layer Masks - novice

    I'm new to layers and layer masks. Can anyone give me a quick tutorial, or a link, on how to do the following:-
    I wish to put the cobweb in to the witch's cave. Obviously, making it smaller and rotating it in the process. I hope the attached photos (from my own album) will help explain.

    You'll probably get more complete answers in the photoshop elements forum, but it's looks like your in the Qiuck Edit mode.
    Press the Full button to get to the full edit mode.
    http://forums.adobe.com/community/photoshop_elements?view=discussions
    Added: i see they already moved your question from the full photoshop forum to the elements forum.
    Message was edited by: R_Kelly

  • Brush Tool is not working with Layer Mask

    Working with Windows platform, using Photoshop CS4, Brush Tool is not working with Layer Mask, how can I resolve this challenge?

    Also, do you have any Selections active - maybe hidden?
    When you have your Layer Mask's Channel active, do your Colors change to black and white?
    Good luck,
    Hunt

  • Adjustment layers not opening mask anymore

    On my laptop I choose an adjustment option and it creates a new layer and layer mask.  On the imac it only creates the layer with the adjustment.   I have to manually add the mask.
    I can't find a preference or setting or anything to get the two to behave the same way.
    Regards,
    Kelly

    Inconsistent from Photoshop UI as well as from Actions.  And becase I know what will cause them to fail. I can create actions and scripts that I know will work no matter how they are set. The step will work the same way no matter which way the options are set.
    For example disable add layer mask you wrote you have no problem doing that.  Do a Ctrl+A (select all) then add an levels adjustment layer to the current layer. You will find that the levels adjustment layer is added with a layer mask.  Photoshop will work that way in actions and from its UI.   So I can record and add adjustment layer and know for sure  a layer mask will be added no matter how a user set the fly-out option.     I can also use Photoshop menu Layer>New Adjustment Layer>Type.  And in its dialog I can Check  use previous layer to create clipping mask.  The Adjustment layer will be clipped no matter which way the fly-out option is set.
    These options breakes  Photoshop original design they are bad options and their implementation is poor. Actions and scripts can not set these options. Scripts can not find out how they are set either. You write Plug-ins do you add adjustment layers in any of them?
    Without using these bugs automating adjustment layers is hit and miss. You would not know the state of the adjustment layer you would not know if you had to add a layer mask or modify or replace the existing mask.  You would not know if the adjustment layer applied to all lower layer or just the previous layer.
    Its a good thing you don't use such action for they could  have problems....

  • Is it possible to apply a saved adjustment preset to a mask

    I am photographing an old photo album that has many badly faded photos. In Aperture I want to be able to apply the same adjustments to the photos on each page without changing the page that they are 'stuck' to.  I can do it with the standard presets but not my saved ones!!  Any ideas?

    You could make several duplicates of the image in Aperture, then crop each of those duplicates to the individual photo you want to adjust, then apply your adjustments.
    Otherwise, you'll need a program which would allow you to make detailed masks, such as Photoshop or Pixelmator. With one of those programs, you could isolate each image with a mask and individually apply adjustments/filters on each one without affecting the "border" areas.

  • Photoshop CS3 crashing when working on image with layer mask

    I've never had problems with Photoshop CS3 (or any other version) until now.
    Here's the problem:
    I created an image that has a layer mask applied to it. The image is saved in one layer (named Layer One) but not flattened in order to retain a transparent background. So far so good.
    But when I try to exapnd the canvas or make other changes to the image, it crashes. Repeatedly.
    Do I have to apply the mask (and thus give up the transparency) to prevent crashes?
    I did find a workaround. Applied the mask, made a cast drop shadow (which is what I was after all along), then copy-and-pasted the drop shadow into the original layer-masked image with transparent background.
    But is this the only way? Am I experiencing a bug or is something else wrong?
    Thanks!

    You create a new user account
    and it will show you where the corruption is. in the old user account or in the system or application.
    It a method of troubleshooting.

  • Photoshop TIFFs with layer masks do not display correctly

    I am sure other people must have this problem, but I cannot find any related posts so here goes:
    I open an image using the "open in external editor" command (typically a RAW file converted to a TIFF), edit in Photoshop and save the file (as a TIFF, I do not use PSD format)
    If the PS edit contains any layer masks or alpha channels (masks in the channel pallet) it does not display correctly when it reappears in Aperture. Only the top most mask will display, assuming I have multiple layer masks in the PS edit.
    Not only will the TIFF only appear as the mask in Aperture, but Aperture will print or email the mask, not the PS edited file as it should appear.
    It seems that Aperture only recognizes the layer mask (or alpha channel mask) as the image, and all the other layers etc are disregarded.
    Is this a confirmed bug, or is there some setting I have not correctly configured or some other issue?
    I love Aperture, but this problem is nearly a deal-breaker for my workflow, and would be for any serious photoshop user, I would imagine!
    I cannot believe this is still a problem in version 1.5, which is the version I am using (thus my system is 10.4.8)

    David,
    I assume you mean in the edited PS TIFF file:
    In different cases I have either:
    A. A TIFF file with layer a layer mask
    B. A TIFF file with multiple layer masks
    C. A TIFF file with an alpha channel mask
    D. A TIFF file with multiple alpha channel masks
    E. A TIFF file with any combination of the above
    the outcome is the same, they all do not display correctly in Aperture. It does not seem to matter if the file was opened in PS from Aperture via the open with external editor command or if it was worked on outside Aperture entirely then imported. I do have maximize compatibility in PS checked (though I understand this is only for PSD files, though perhaps I am wrong here)
    any thoughts?

  • Issues with merging layers with layer styles

    Just downloaded CS6 Photoshop off the creative cloud and the merge layer command does not work. What is happening is there is one layer with a layer style then a shape layer and when I hit Cmd E it merges the layers but the layer style will not merge with it. I was chatting it up and everything they recommended did not work. It works on all my other co-workers computers and we are all on the cloud. I tried renaming pref. folder, settings folder, re-installing, holding down shft+option+cmd on start up. I also created a test account but that turned out to be a major inconvenience. Once logged into the account there is nothing there. The suggestions just started getting more ridiculous as chat proceeded. Nothing.
    Has anyone experienced this issue?
    Does anyone have a solution where I don't have to create a whole new admin account just to see if CS6 Photoshop works correctly?
    P.S.
    Adobe customer portal is about worthless.

    Get Rich or Die Tryin wrote:
    Just downloaded CS6 Photoshop off the creative cloud and the merge layer command does not work. What is happening is there is one layer with a layer style then a shape layer and when I hit Cmd E it merges the layers but the layer style will not merge with it. I was chatting it up and everything they recommended did not work. It works on all my other co-workers computers and we are all on the cloud. I tried renaming pref. folder, settings folder, re-installing, holding down shft+option+cmd on start up. I also created a test account but that turned out to be a major inconvenience. Once logged into the account there is nothing there. The suggestions just started getting more ridiculous as chat proceeded. Nothing.
    There are two merge layers type commands  one is merge down involves only two layers and another that is merge visible layers.  In my opinion there is a problem with the way merge down is implemented. When you use merge down if the bottom layer in the merge down has a layer style the merged layer also has this layer style attached.  This means that pixels from the layer merged into it will be effected by this layer style.  The result may well not look like the composite looked before the merge. The will also happen in CS5. Merge visibile layer works the correct way in my view as the merge progresses the top two layers are merge by applying any layer masks and layer styles first and merging the two layers the resulting layer has no layer masks and no layer style. This result is then merged with the next lower layer with its masks and style applied first. The result is a single layer without mask and style that looks like the original composite view.  If your having the problem with CMD|CTRL+E and the result has a layer style try turning  the layer style visibility off see if that helps.  If it helps some  backup to before the merge down  use merge visible or first rasterzise the bottom layer to be merged.

  • Brush Tool Error with Layer Masks

    I've identified a layer mask bug in Photoshop 14.2.1 for Mac. When working with non-vector layer masks, the brush tool will not paint a darker value than the white level present in the mask. For instance:
    when a layer mask is created from the icon at the bottom of the layers window, the mask itself is white, representing full visibility in the masked layer. If you attempt to use the brush tool with 100% black (to actually mask something in the applicable layer), it does not function. I am able to use the paint bucket tool and the pencil tool to fill black in the mask, but not the brush tool. If the mask is 67% grey, and my brush tool is set to 66% grey, it still will not affect the mask; the white level cannot be decreased, only increased with the brush tool. Bug!

    Sure. A mask is just a greyscale image and the blending mode is a property of the brush tool not the mask.
    It is actually a very useful feature especially for extracting hair. When painting with black/white in overlay mode you can easily clean up the edges without affecting the pure black/white parts of the mask.

  • Saving Adjustment Layers

    I know you can save adjustment layers as presets. Is there a way to include the Blend Modes and Opacity settings with the adjustment layer? (Similar to the way you can save layer styles.) (I am running PS CS5.1)

    You'll probably have to record an action to include such settings as opacity and blend modes.

  • Please help with Layer Mask

    I have been painting in Photoshop using layer masks. Using the pen tool I would outline my image, control>R-click>select create layer mask, then I would paint as desired. When doing so it would create a grey layer mask background in the layers window and everything would work100%. But now all of a sudden when I do this process the layer mask square turns white and it seems as the mask I have created is inverted. I paint everything but the mask I want. I have no clue how to turn it back to the original grey colour I was using. Please help.

    Using the pen tool I would outline my image, control>R-click>select create layer mask,
    So are you using a Vector Mask or a Layer Mask?
    Could you post a screenshot?
    What are the Paths’ Area settings?

  • Flattening or merging layers with layer effects and maintaining them.

    How do you maintain multiple layer effects when merging or flattening the layers within a group or on their own ensuring they end up eventually to normal and 100 % opacity? (Using PSCC)
    Thank you.

    You want to flattern an image with multiple layers and layer effects?  It should just happen for you, but there some occassions where flatterning does not show the expected results.  When that happens, select the upper-most layer (so long as it is turned on) and add a copy merged layer to the top of the stack (Shift Alt Ctrl e).  Then flattern, and it should be fine.

  • Problem with layer masks ... help

    Ok. I have my original image. I've added a layer to make it black and white. Then added a layer mask to that because I want to make a section of it color. I'm using the brush tool to do so but having no luck. Yes I am on the correct layer and correct mask. I've done this several times before, but for some reason, today its not working. help

    Good day!
    Could you please post a screenshot with the pertinent Panels visible?
    What are Foreground- and Background Color?
    What are the Tool’s Blend Mode, Opacity and Flow?
    Is a Selection active?
    Regards,
    Pfaffenbichler

  • LR4: Adjustment Brush, Viewable Layer Mask

    In LR4, when using the adjustment brush, is there a way to always keep the layer mask viewable (the red layer)?  Not just viewable when you hover of the circle.
    Thanks,

    Press the letter 'O' on your keyboard to switch the mask on and off again. Or use the little checkbox at the bottom left of the window.

  • Trouble fading layer with layer mask

    I'm trying to blend a photo with a background color. I select the new layer mask (selected), I select the gradient tool (color into transparent), and then draw a line to fade the image layer into the background later and it does nothing. Why isn't this working? Every tutorial I have looked at tells me to do these steps. How do I fix this??

    I don't see any black on your mask. It should look something like this: Whatever is painted black on the mask will be masked on the layer, depending on the transparancy of the black.

Maybe you are looking for