[PS CS4] Method of the hasTransparency() layer?

Hello

I need to check whether or not a transparent layer

pixels. I searched the forums, but all the issues are on

loading/modification transparency/layer masks, and I can't

seem to understand how to translate all of the brilliant tips

in a simple method of hasTransparency().

I have downloaded xbytors xtools but lost in all the code...

Can any of you give me a kick in the right direction?

Thank you.

Rasmus

You can try this...

alert(hasTransparency());
function hasTransparency() {
    var desc52 = new ActionDescriptor();
        var ref47 = new ActionReference();
        ref47.putProperty( charIDToTypeID('Chnl'), charIDToTypeID('fsel') );
    desc52.putReference( charIDToTypeID('null'), ref47 );
        var ref48 = new ActionReference();
        ref48.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Trsp') );
    desc52.putReference( charIDToTypeID('T   '), ref48 );
    desc52.putBoolean( charIDToTypeID('Invr'), true );
    try{
    executeAction( charIDToTypeID('setd'), desc52, DialogModes.NO );
    }catch(e){return false;}
    activeDocument.selection.deselect();
    return true;
};

Tags: Photoshop

Similar Questions

  • CS4 Crash in the BW adjustment layer

    I use the black and white adjustment layer in CS4. After the conversion to black and white, I select the "cursor" tool/eye drops to be used directly on the image (sorry, I don't know the official name). As soon as I do that, the PS crashes. I can manually adjust the sliders; Sometimes it affects the image, sometimes not.

    Any ideas? Preferences of the trash?

    Thank you

    Debbie

    P.S., Macbook Pro, 10.8, suite CS4 Design.

    Hi Debbies,

    I suggest you to reset the Photoshop preferences as you mentioned that to adjust manually the sliders sometimes will not work.

    Using Photoshop | Preferences

    Please let us know if it helps.

    Concerning

    Sarika

  • Layer setting pixel: best access method to the

    Hi guys,.

    I m according to the parameters of the layer to some effects, and it works well.

    Again, I use two methods to do so.

    First method:

    Def PF_ParamDef;


    AEFX_CLR_STRUCT (def);



    ERR (PF_CHECKOUT_PARAM)in_data,








    layerID,







    -> current_time in_data,






    -> time_step in_data,






    in_data-> time_scale,






    (& (def)));

    PF_EffectWorld myLayer = def.u.ld;

    Err2 (PF_CHECKIN_PARAM (in_data, & (def)));

    PF_COPY (& myLayer, output, NULL, NULL);

    Second method:

    in PreRender reminder:

    extraP-> cb-> (checkout_layer)in_dataP-> effect_ref,












    layerID,









    layerID,








    & req,








    in_dataP-> current_time,








    in_dataP-> time_step,








    in_dataP-> time_scale,








    (& ck_result))

    as a reminder of rendering

    PF_EffectWorld myLayer *;

    ERR (extraP-> cb-> checkout_layer_pixels (-> effect_ref, layerID, & myLayer in_data));

    PF_COPY (myLayer, output, NULL, NULL);

    extraP-> cb-> checkin_layer_pixels (in_data-> effect_ref, layerID);

    If I read the documentation, the second method is the good method. The first method still works fine...

    I m wondering if they are equivalent, and if I have a problem with either of these method...

    Thanks for all of the shared experience.

    the two methods are ok, but they differ in some ways.

    1. the second method is more 'economic', because it allows smartFX to plan ahead and use resources more effectively.

    It does not affect the unique plug-ins performance as it allows for the rendering process using ram and pads better. (and this is useful for making them overall fastest)

    2 smartFX is not supported by all other hosts, so if you care about porting to other hosts, you should take account (regardless of the detour of layers).

    3. during the audit on the same layer, you're on, method 1 will give you a pre-effets image and method 2 will give you after (previous effects in the stack, which is), even if you sample times other than at the time of the currently rendered image (which took me by surprise, BTW).

    If it's relevant to you, you should know which of the two methods you prefer.

  • Cannot isolate the first layer without the second layer: Ai CS4

    I add the second layer and draw randomly of the paths, I then use curvilinear tool selection but it always activates the first layer, even if it is not highlighted.

    The only method that seems to work is if I turn off the first complete layer using "eye" icon, which is very time consuming.

    I just found that CS5 will be released April 12: he will address the issues that I am experiancing and qualify free update (I bought it a month ago, but have not yet registered)?

    function() {return A.apply (null, [this] .concat ($A (arguments)))}

    The only method that seems to work is if I turn off the first complete layer using "eye" icon, which is very time consuming.

    Do not hide the layer; You can only lock it. Alternatively, you can select the Mode of insulation enter the context menu of the layers.

    But your feature request is legitimate. Other programs provide a framework to activate only the active layer.

    JET

  • quick method to create a new layer under the current layer?

    would be the best way to quickly create a new layer slot rather than above the active layer to assign a script to a keyboard shortcut - or is it possible to change the default new layer shortcut (command + option + SHIFT + N) to create a new layer above the current layer to create rather a under the active layer?

    Thank you

    Command-click the new layer in the layers Panel button.

  • JS CS4: Create the variable for the active layer, and then select the layer at the end of a script

    I'm come white with the verbiage and spin my wheels with OMV guide and script.

    var myOriginalLayer = app.activeDocument.layers.item (0);
    Alert (myOriginalLayer)

    Returns "layer object" and not the name of the layer.

    var myOriginalLayer = app.activeDocument.layers.lastItem () .name;

    Returns the name of the layer I want but not by choice.

    I am challenged on how to select the layer.

    Hi John,.

    The difference lies in that the [Object Layer] is the real object, and the 'name' is a property - like color.

    You can use one of these two approaches:

    var myOriginalLayer = app.activeDocument.layers.item (0);
    Alert (myOriginalLayer.Name);

    hosts the original layer object, and you can see the name if necessary :-)

    For re - select the layer, use

    app.activeDocument.activeLayer = myOriginalLayer;

    You can also select name goes like

    var myOriginalLayerNAME = app.activeDocument.layers.lastItem () .name;

    ...

    app.activeDocument.activeLayer = app.activeDocument.layers.item (myOriginalLayerNAME);

    I also noted the following:

    app.activeDocument.layers.item (0) points to the first layer of your document; not the 'active'. Similarly, app.activeDocument.layers.lastItem () points only to the very last. I don't know if the order of the activeDocument.layers array mimicks the order as shown in the tags palette, but I hope for it :-)

    To get/set the active layer, use app.activeDocument.activeLayer as shown above.

  • Apply the adjustment layer to a layer group

    Is there a method to apply an adjustment layer to a layer group?

    I have a curtain on a layer of a Photoshop CS4 document.

    I have reproduced the curtain twice and repositioned the copies.

    Now, I would like to use an adjustment layer to change the color of my curtains without affecting the rest of the composition (and I can't move the curtains down because they need to sit above other elements).

    I tried to bring my 3 layers of curtain set, then applygin an adjustment layer > hue > colorize - but that affects the entire composition.

    When the layers are grouped, holding ALT while hovering between the adjustment layer and the group does not have the special icon that allows you to apply the adjustment to the layer below.

    Would be apprecaiate andive on how to apply an adjustment layer to a layer group.

    (I can go back and apply my adaptation to the original curtain can reduplicate and reposition, but would have to repeat this procedure every preference change color).

    Thank you?

    Put your layers into a folder and change the mode to normal fusion of records through. You can then put an on the top layers adjustment layer in the file, and this will not affect what is located in the folder.

  • Custom attribute in the model layer properties

    Hey all,.

    Can someone explain the flow of the program "ADF practice: using custom attribute in the model layer properties of". "" Basically, how change custom properties like "customLabel" changed the label attribute. Is there properties specific adf we can refer to properties for the attribute?

    Reference will also be useful.

    Thank you!!

    What exactly you want to know?

    It's pretty clear from what I've read:

    You can set properties that are customized for each attribute in a vo. This is done in the vo attributes dialog box where the default value.

    You can override the default values that is done in the setCustomHints() method. This method is called by the button in the user interface (actionListener = "#{bindings.setCustomHints.execute}" ")

    The inputtext is set to display the properties for the label (label = "#{bindings.") DepartmentName.hints.customLabel}') and uses the custom readOnly property (readonly = "#{bindings.") DepartmentName.hints.readonly}')

    As the inputText component is updated after the button clicked on (via a pertial in the inputText trigger), it shows the a values.

    Timo

  • Connect to the presentation layer of the RPD

    Hi all

    Please let me know if there is any way a method to connect to the presentation layer of the RPD, so that I can all the subject of an external application.what are the steps to integrate an external application so that I can see all the business models built.

    Kind regards

    Sri

    OBIEE supports ODBC and JDBC - use one of your application. "tables" will display presentation folders.

  • Have installed Photoshop CS4. Replaced the drive hard and now I get error code 150:30. What should I do to get it working again

    Have installed Photoshop CS4. Replaced the drive hard and now I get error code 150:30. What should I do to get it working again

    Migration of CS4 breaks the license. That's what 150:30 means. Assuming you are using a Mac.

    You can use the Terminal method to repair the license... but I stress that carefully read you and understand the instructions here before you run it. beginning

    # 11. https://forums.Adobe.com/thread/1714695

    If this isn't what you want to do, you have to reinstall.

    Gene

  • AppleScript cannot change the font of the text layer

    I used Applescript to create a text layer and specify its properties, but when I specify the font I get a compilation error:

    Impossible to define 'class NTR' to 'TradeGothic-Bold ". Unauthorized access.

    That sounds like a kind of permission error.

    Here is a little simplified script:

    Tell application "Adobe Photoshop CS4"

    say current document

    do new layer of art Properties {name: "File name", type:text layer}

    say the text object layer of art 1

    the value {content, size, stroke color, position, type} {"thefilename", 12, {class:RGB hexadecimal color, hexadecimal value: 'CC0000'}, {2, 12}, text of paragraph}

    set the font to "TradeGothic-"BOLD""

    tell the end

    tell the end

    tell the end

    If I put the police manually and use 'get properties of the text object in layer art 1', the Script Editor returns (with a long list of other properties):

    "" police: 'TradeGothic-"BOLD".

    so I think that I've specified the name of the font correctly at least. In the list of properties returned by the Script Editor, the font is blue like above, but all other property names are purple. It's I have to say something.

    Well, after some trial and error, I answered my own question. Here's what worked:

    Tell application "Adobe Photoshop CS4"

    tell the active document

    new layer art with properties {name: "File Name", layer type: text}

    the text of the layer 1 of the art of storytelling

    the value {content, size, stroke color, position, type} {"thefilename", 12, {class hex color: RGB, hex value: 'CC0000'}, {2, 12}, paragraph text}

    tell the end

    set the font for the text of art layer 1 to "TradeGothic-"Bold"object

    tell the end

    tell the end

    Maybe someone who understands OOP and/or better than I do, may explain why it worked and my first try didn't.

  • Exclude the track (s) of the adjustment layer

    Hello world

    I use Premiere Elements for many years and am now test Premiere Pro to make the Decision to change to pro or not weather.

    So I try a few things and have mor than one question

    1: I wonder if there is a method to bind an adjustment layer to specific and not too ALL titles follow below.

    Problem: Using the green screen images and make the entry in the adjustment layer (because the film changes with every project, but the entry parameters are always the same - so an adjustment layer is ideal to keep the settings) means that the effects of adjustment layer of her down the track with background images that I want to insert. So I'm looking for a method to warn the adjustment layer one who tracks it has to work on... and which should not.

    Is this possible? and how?

    2: in Premiere Elements I liked the simple way to insert a fade-in or melted to the video and audio tracks just right click on the item in the Assembly of witch and then choose 'Add Transition' with the options "Audio fade-in ', 'fade-in video', 'Fade Audio', 'video Fade-out' that adds the length preset for transitions to the clip. Tool me about one second.

    In Premiere Pro I cannot find this feature in the list right click options. So, I really need to I add each fade in and fade-out manually by using the effect options and setting keyframes manually from 0 to 100? Seems odd that Pro is less intelligent than the elements...

    Or how to do that in Pro?

    3: in the window "Export media" I struggle with the adjustment that will be made, which means that litte drop-down menu with 'all' or 'working space' - I hope you know what I mean?

    Problem: This setting always jumps back on 'working space', even if I used the last time that "everything." And 'all' is the way I went my projects to 99%. So I wonder where I can edit the preset of this option to 'all '.

    Thanks for your help in advance!

    Kind regards

    Lutz

    1 No., the key effect does not work on an adjustment layer, it generates no alpha channel.

    It must be on the clip, but you can save the settings as a preset.

    You can't say to an adjustment layer which layer to use when they are stacked at the top.

    2. in the preferences, you can set the default length of transitions.

    The default transition is Cross Fade, for constant power audio for video.

    3 workspace is the default when you use the work area bar in the timeline.

    If you put default WAB to the output sequence.

  • How to use the camera layer.

    Hello, I use Adobe AE CS4 in my 32-bit of Windows XP computer.             I downloaded a few youtube tutorial and followed very closely and I have a project to make what is 95% complete. I'm stuck at the tool camera layer, I want the camera to follow every word of the philosophy that I have inserted in the project. Could someone tell me how, I did with the background, light, text, now the last would be the camera layer. How can I achieve that. Any help is greatly welcomed. Thank you.

    Just set keyframes for the camera and move it. You can set the values in the timeline panel or use different views to adjust the position of the camera. Please search the help files in the animation of a camera. We cannot give you much better than advice without knowing what tutorial you follow.

  • Failed to create a mask on the adjustment layer

    Hello.

    I want to apply motion tracking to mask data, that is why I am trying to use an adjustment layer to control the position of the mask. So I followed him motion on a video montage, applied to the adjustment layer, then marked tracking data the adjustment layer and drew a mask closed on it. However, when I finished the mask, he don't "cut the hole" on the video sequence (which is directly under the adjustment layer). I tried all available modes (Add, Subtract, Intersect etc), but only the contours of the shape of the mask are visible on the video footage.

    How can I apply a mask of an adjustment layer? Or maybe there are other methods to apply the query to a mask tracking data?

    Thank you

    Adjustment layers are applied not necessarily affect alpha channels. You could simply cut the adjustment layer and then use the adjustment layer has a matte.

  • How to get feedback from users in the model layer?

    Hello

    I have a page with a table and a commandButton control. User can select several rows in the table and press the button. By pressing the button, I call a method in AppModuleImpl.java and pass the selected lines. inside the method I iterate over the selected lines and do something on each line. To do my job, I need a field, for example the date of birth field, has a value, but for certain lines of this field is empty and I want to get the value of the user. Now my question is how can I get user feedback in the model layer? (don't forget that I am inside the AppModuleImpl.java)

    Is it possible to open a dialog by program and get the value of the user if needed (i.e. If the row has the value)? If Yes, how should I do?

    JDev version: 11.1.1.4

    Thank you
    Will do

    In both cases the execution does not stop to view the context menu and the popup is displayed when the called managed bean method is completed

    Execution does not stop. That is right.

    "Modal dialog box" in terms of web simply means 'a dialogue box that blocks (more or less) user input until the dialog box is closed'. You think that a modal dialog is a dialog box that stops execution of your code until the dialog box is closed and then execution continues where you left it. There is no such thing in the web. Enforcement must continue, the demand must fill. When the user closes the dialog box, then it is a new application in.

    Thus, it is not as a modal dialog in Swing. You need to stop running yourself when you open the modal dialog box and continue your code when the next request comes, for example:
    You determine that a dialogue must be shown, you open the pop-up window and return. The listener to the dialog box, you then call a method that continues to do what you need to do according to the result of the dialog box.

    Sascha

Maybe you are looking for

  • Problem syncing Bluetooth with headset Samsung level U

    I have an iPhone7 and the SW last update 10.0.2.  Bluetooth is turned on and the headset is also turned on.  The iPhone is not recognized/sync with the headphones?  As I know there is no way to update the firmware in the helmet.  I have another devic

  • Since Friday, I can't the individual Facebook messages to load on Firefox.

    I use 7.0.1 on Windows XP. Messages load correctly on IE. On Firefox, it behaves as if it is loading, but never does. Any ideas? Anyone with the same problem? I disabled the cache and cookies, but that did not help.

  • Qosmio G20: How do you get TV to work?

    Hi, I recently bought a laptop Toshiba Qosmio G20. I want to watch a Divx on my TV using the laptop as the player. But, I can't get anything to display on my TV, my TV remains empty. I tried pressing on now the keys Fn and F5 and this doen't seem to

  • Photo/video Imovie 10.1.1 overlap.

    Hello world I installed the new version of IMovie some problems on the cumulation of function. Can someone help me? Thank you Alessandro

  • Presario CQ57: My laptop does not meet my charger

    My battery is low and needs to be replaced.I've had my phone for over 3 years now and I've noticed that these days, he does it to the power supply terminal. And I tried 3 thing that Google can help me with, but nothing seems to work