Copying two layers through same selection mask produces different dimensions on new file

Hi all,
This is driving me insane!
I'm creating an animation in AE eventually but initially have two hand drawn images of the same object that I've scanned into PS.
I have a single mask created that I turn into a selection to copy the two images to output as new single files to then import as 2 frame png sequence into AE.
Normally, and this is critical, the dimension of the new files would/should be exactly the same.
But they're not!
How is this possible, the selection is the same for both layers.
Any suggestions, help, assistance, very much appreciated.
thanks
Yan

yancowles wrote:
Still annoying though, I'm creating the double drawn animation effect and it would help if I could make the new files to exactly the same dimensions quickly and easily somehow.
Menu file>Save As to create a new file Photoshop is not a file editor. For a new document the same size menu File>New or Ctrl+N then use the preset pull down menu  and select the open document that has the size you want.
You can also script a new document from selection.
/* ==========================================================
// 2009  John J. McAssey (JJMack)
// ======================================================= */
// This script is supplied as is. It is provided as freeware.
// The author accepts no liability for any problems arising from its use.
// Download from the web and fixed to work better
<javascriptresource>
<about>$$$/JavaScripts/NewDocumentFromSelection/About=JJMack's New Document From Selection.^r^rCopyright 2009 Mouseprints.^r^rJJMack's Script.^rNOTE:New Document From Selection!</about>
<category>JJMack's Script</category>
</javascriptresource>
// 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
app.bringToFront();
// ensure at least one document open
if (!documents.length) alert('There are no documents open.', 'No Document');
else main(); // at least one document exists proceed
//                            main function                                  //
function main() {
          try {
                    // Set the ruler units to PIXELS
                    var orig_ruler_units = app.preferences.rulerUnits;
                    app.preferences.rulerUnits = Units.PIXELS;
                if(hasSelection()) newDocFromSelection();
                    // Reset units to original settings
                    app.preferences.rulerUnits = orig_ruler_units;
          // display error message if something goes wrong
          catch(e) { alert(e + ': on line ' + e.line, 'Script Error', true); }
//                           main function end                               //
function hasSelection(doc) {
          if (doc == undefined) doc = activeDocument;
          var res = false;
          var activeLayer = activeDocument.activeLayer;          // remember active layer
          var as = doc.activeHistoryState;                    // get current history state #
          doc.selection.deselect();
          if (as != doc.activeHistoryState) {                    // did the deselect get recorded
                    res = true;
                    doc.activeHistoryState = as;                    // backup and reselect
          activeDocument.activeLayer = activeLayer;          // insure active layer didn't change
          return res;                                                   // return true or false
function newDocFromSelection() {
          var AD = app.activeDocument.name;      // remember current document name
        /* the following code seems to be from the script listener  what it
            does is to add a layer via copy selection ( Ctrl+J) which will fail
            if the select area of the active layer is empty then code then creates
          a new documents with a normal layer cotaining the contents of that layer */
          executeAction( charIDToTypeID('CpTL'), undefined, DialogModes.NO );//
                    var desc5 = new ActionDescriptor();
                              var ref2 = new ActionReference();
                              ref2.putClass( charIDToTypeID('Dcmn') );
                    desc5.putReference( charIDToTypeID('null'), ref2 );
                    desc5.putString( charIDToTypeID('Nm  '), "NewDoc"+documents.length.toString());
                              var ref3 = new ActionReference();
                              ref3.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
                    desc5.putReference( charIDToTypeID('Usng'), ref3 );
                    desc5.putString( charIDToTypeID('LyrN'), "From Selection" );
                    executeAction( charIDToTypeID('Mk  '), desc5, DialogModes.NO );
                    app.activeDocument.trim(TrimType.TRANSPARENT);          // trim new document transparency
                    activeDocument = documents.getByName(AD);          // retun to the old document
                    activeDocument.activeLayer.remove();                    // delete layer added via Ctrl+J 

Similar Messages

  • Aligning two layers using manually selected reference points

    I am trying to align two images that have the same pattern of thousands of dots, but the two images are not properly aligned or scaled but do have the same aspect ratio. I have tried manually aligning the two images resulting in no forward progress and much frustration. Is there a way to use a series of points selected manually as reference points to then align two overlapping images?
    Thanks in advance for the help.

    Try turning on rulers (View > Rulers). Then drag out guides from the rulers to help with alignment.

  • Multiple Layers Export in Clipping Mask (Without using Layer comp to files script)

    Man, Actually I am designer and create mobile case design. I have done mobile cover design preview in psd. so many layers created. Top layer-group Camera & button.  Second Layer-group different mobile  cover designs in clipping mask.. I want to export the preview (without using Layer comp to files). Means Single design to export without hiding the layers.... 30 design preview in single click....

    Mine don't even work.

  • Use same selection formula in different subreports

    I have got a main report that will have its own selelction formlua, then im planning to have multiple subreports that will use part of the selection formula from the main report in addition to its own selection formula. So i want know if there is way where  if I make a change to the main selection formula it reflects in the subreports as well.
    For Example
    main report:
    {ContractsTable.Contract}="123456"
    subreport 1
    {ContractsTable.Contract}="123456" and
    {ContractsTable.Country}="United Kingdom"
    subreport 2
    {ContractsTable.Contract}="123456" and
    {ContractsTable.Region}="East"
    What im trying to figure out is that if change the parameter for the {ContractsTable.Contract}  from "123456"  to "789125" in the main report, i want the change to reflect in the subreports as well.i dont want to be going to each subreport and changing the parameter.
    I have tried to work out a solution using shared variables and parameters,but failed miserably.Has anyone git any ideas?

    Hi Thomas,
    You can the option "Change Sub report Link" and link the 2 subreports with the parameter the mainreport uses.
    For Example if Main Report Uses Parameter ?Contract
    Then link that with each Sub report Parameters ?Contract1 and ?Contract2
    So When you refresh the Main report it only asks for one parameter i.e ?Contract
    and all the Sub reports runs according to it.
    Thanks,

  • Two users on same itune account on different ios

    husband and I have i phones and have been streaming icloud library on same account--since ios 7.2 we can no longer use i  message--i has been suggested that it is a new security feature on the update --how can we both access our huge icloud library independently so that we can have i message working on our phones???  help!

    I'm not exactly clear what you are saying here. Is it that messages is not working at all and if so what happens when you try, or is it that you are both receiving each other's messages.

  • Old outer join syntax produces different results from new syntax!

    I have inherited a query that uses the old outer join syntax but that is yielding correct results. When I translate it to the new outer join syntax, I get the results I expect, but they are not correct! And I don't understand why the old syntax produces the results it produces. Bottom line: I want the results I'm getting from the old syntax, but I need it in the new syntax (I'm putting it into Reporting Services, and RS automatically converts old syntax to new).
    Here's the query with the old outer join syntax that is working correctly:
    Code Snippet
    SELECT   TE = COUNT(DISTINCT T1.ID),
             UE = COUNT(DISTINCT T2.ID),
             PE = CONVERT(MONEY, COUNT(DISTINCT T2.ID)) / 
                  CONVERT(MONEY,COUNT(DISTINCT T1.ID))
    FROM     TABLE T1, TABLE T2
    WHERE    T1 *= T2
    In this query, much to my surprise, TE <> UE and PE <> 1. However, TE, UE, and PE seem to be accurate!
    Here's the query with the new outer join syntax that is working but not producing the results I need:
    Code Snippet
    SELECT   TE = COUNT(DISTINCT T1.ID),
             UE = COUNT(DISTINCT T2.ID),
             PE = CONVERT(MONEY, COUNT(DISTINCT T2.ID)) / 
                  CONVERT(MONEY,COUNT(DISTINCT T1.ID))
    FROM     TABLE T1 LEFT OUTER JOIN TABLE T2 ON T1.ID = T2.ID
    Though not producing the results I need, it is producing what would be expected: TE = UE and PE = 1.
    My questions:
    1) Can someone who is familiar enough with the old syntax please help me understand why TE <> UE and PE <> 1 in the first query?
    2) Can someone please tell me how to properly translate the first query to the new syntax so that it continues to produce the results in the first query?
    Thank you very much.

    How can we reproduce the issue?
    Code Snippet
    USE [master]
    GO
    EXEC sp_dbcmptlevel Northwind, 80
    GO
    USE [Northwind]
    GO
    SELECT
    TE
    = COUNT(DISTINCT T1.OrderID),
    UE = COUNT(DISTINCT T2.OrderID),
    PE = CONVERT(MONEY, COUNT(DISTINCT T2.OrderID)) /
    CONVERT(MONEY,COUNT(DISTINCT T1.OrderID))
    FROM
    dbo
    .Orders T1, dbo.Orders T2
    WHERE
    T1
    .OrderID *= T2.OrderID
    SELECT
    TE
    = COUNT(DISTINCT T1.OrderID),
    UE = COUNT(DISTINCT T2.OrderID),
    PE = CONVERT(MONEY, COUNT(DISTINCT T2.OrderID)) /
    CONVERT(MONEY,COUNT(DISTINCT T1.OrderID))
    FROM
    dbo
    .Orders T1
    LEFT OUTER JOIN
    dbo.Orders T2
    ON T1.OrderID = T2.OrderID
    GO
    EXEC sp_dbcmptlevel Northwind, 90
    GO
    Result:
    TE
    UE
    PE
    830
    830
    1.00
    TE
    UE
    PE
    830
    830
    1.00
    As you can see, I am getting same results.
    AMB

  • BPC Conversion File - Same External ID for different Dimensions

    Hello Experts,
    I hope you can help me.
    We are running BPC NW V10.0 SP13
    I have a Conversion File for External to Internal Mapping on the DATASRC Dimension.
    See Image 01
    I would now like to use the same 'External ID' to identify the mapping rules for two Dimensions, DATASRC and CATEGORY Member ID
    See Image 02
    The rules that determine how the External ID is mapped are subjective rather than derived from patterns present in ID.  This means I cannot use any conditional logic to determine the mapping rules. For example, I cannot assume that all IDs that start with 99Z19 will need to be mapped the same way.
    So the CATGORY Member ID needs to be hard-coded somehow.
    Although it is simple enough to copy the entire worksheet and hold the mapping for each Dimension as separate w/sheets, this duplicates the amount of ongoing maintenance and turns 80 rules into 160 (a number which will rise!)
    Is there a way of using javascript in the Formula column to identify the Internal Member ID for the CATEGORY Dimension.
    If so, how would the Transformation File reference this?
    Any help would be much appreciated

    Sorry Vadim, I was having problems uploading the actual files.
    So I have had to screenshot instead...............
    Transformation File
    Conversion File
    As you can see, the Trans file assumes the CATEGORY is fixed to one Member.
    But I want to use the External ID in the the DATASRC Conversion w/sheet and specify different CATEGORY Member IDs.

  • Why two of the same folder?

    I'm getting two of the same folders somehow and I don't know how to fix it.
    Take a look:
    http://img.skitch.com/20100923-jw9p6yh3enfpngei3rhxrbektp.pdf
    What you are seeing is two of the same folder showing up in LR, but their files within each are different.  How can I combine these folders so that they correctly show the architecture of my hard drive as one folder?
    Additionally, how do I prevent this in the future?
    Thank you,
    J

    Beat,
    I'm doing something wrong and I don't know what it could possibly be as I seem to be following your instructions very closely.  Here are your instructions with my questions in Red:
    How to consolidate:
    "Add Parent Folder" on all the folders to be consolidated, so you end up with as few top level folders as possible So, on both sets of "2010" I right click and hit Add Parent Folder so now they both have "Lightroom" as the parent folder
    On all of the top level folders under a "non strategic" drive, choose "Update Folder Location ..."
    Navigate  to the folder on the network share through the path which you want to  use in the future (one of the three described above) After I right click, I only have one option... to navigate in my Mac Finder to where the "Lightroom" (Parent) folder is
    Now LR will  (rightly so) tell you that the selected folder already exists in LR and  asks you whether you want to combine the two folders
    After I do all of the above things don't go exactly as planned.  Do you know if your method only works for PC's?  Does anyone know of a Mac solution that will work without disturbing the metdata and image changes?

  • Two triggers on same table

    Hi Friend.
    I have to write two triggers on same table for auditing different columns of different users(may be different modules).
    I will have an audit table in which i will insert data such as (user_id,module_id,column_name,old_col_val,new_col_val,timestamp)
    Now different users from different modules will update the data on same table may be same columns from different front end forms!
    If we write directly, we will not be able to know which column is updated by which user.
    My question is in this case how can we control the triggers to raise differently?

    You can use WHEN clause to fire a trigger only when some condition is true - you can check an user also,
    look at simple example:
    - suposse we have two users US1 and US2:
    C:\>sqlplus sys as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Pn Gru 6 13:14:22 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> create user us1 identified by us1;
    User created.
    SQL> create user us2 identified by us2;
    User created.
    SQL> grant connect, resource to us1, us2;
    Grant succeeded.
    SQL> grant create public synonym to us1, us2;
    Grant succeeded.and suposse we have a table with three columns + audit table:
    SQL> connect us1
    Enter password:
    Connected.
    SQL> create table tab123(
      2  col1 number,
      3  col2 number,
      4  col3 number);
    Table created.
    SQL> create table audit_tab123(
      2  username varchar2(100),
      3  col1 number,
      4  col2 number,
      5  col3 number );
    Table created.
    SQL>  grant select, update, insert on tab123 to us2;
    Grant succeeded.
    SQL>  grant select, update, insert on audit_tab123 to us2;
    Grant succeeded.
    SQL> create public synonym tab123 for tab123;
    Synonym created.
    SQL> insert into tab123 values( 1, 1, 1 );
    1 row created.
    SQL> commit;
    Commit complete.We want a trigger that is fired only by user US1 and only after update of COL1 and COL2
    (COL3 is ignored):
    SQL> connect us1/us1
    Connected.
    SQL> CREATE OR REPLACE TRIGGER Trig_123_US1
      2  AFTER UPDATE OF col1, col2 ON tab123
      3  FOR EACH ROW
      4  WHEN ( user = 'US1' )
      5  BEGIN
      6    INSERT INTO audit_tab123( username, col1, col2 )
      7    VALUES( user, :new.col1, :new.col2 );
      8 END;
    SQL> /
    Trigger created.And we want a second trigger that is fired only by user US2 and only after update of COL2 and COL3
    (COL1 is ignored):
    SQL> connect us1/us1
    Connected.
    SQL> CREATE OR REPLACE TRIGGER Trig_123_US2
      2  AFTER UPDATE OF col2, col3 ON tab123
      3  FOR EACH ROW
      4  WHEN ( user = 'US2' )
      5  BEGIN
      6    INSERT INTO audit_tab123( username, col2, col3 )
      7    VALUES( user, :new.col2, :new.col3 );
      8  END;
      9  /
    Trigger created.and now let test our triggers:
    SQL> connect us1/us1
    Connected.
    SQL> update tab123 set col1 = 22;
    1 row updated.
    SQL> update tab123 set col2 = 22;
    1 row updated.
    SQL> update tab123 set col3 = 22;
    1 row updated.
    SQL> commit;
    Commit complete.
    SQL> select * from audit_tab123;
    USERNAME         COL1       COL2       COL3
    US1                22          1
    US1                22         22
    SQL> connect us2/us2
    Connected.
    SQL> update tab123 set col1 = 333;
    1 row updated.
    SQL> update tab123 set col2 = 333;
    1 row updated.
    SQL> update tab123 set col3 = 333;
    1 row updated.
    SQL> commit
      2  ;
    Commit complete.
    SQL> select * from us1.audit_tab123;
    USERNAME         COL1       COL2       COL3
    US1                22          1
    US1                22         22
    US2                          333         22
    US2                          333        333As you see, each trigger is fired only once, first triger only for user US1 and columns COL1 and COL2,
    and second trigger only for user US2 and only after update of COL2 and COL3.
    I hope this will help.

  • PreparedStatement & regular Statement - different results for same select

    I was wondering if someone could either
    i) try this out for me to confirm my results or
    ii) let me know what I am doing wrong
    I'm one of the developers on a product and am currently investigating localization for the Thai language...just checking to see that Java and Swing have no problems with it. The only bewildering thing which has happened is noticing that some values which are fetched from the database display in Thai perfectly and other values display as a garble. Sometimes the exact same column is displayed correctly in one part of the program but is not OK in another part. I think I've figured out what it going on and suspect a bug in Oracle's JDBC:
    Some selects were configured as PreparedStatements and those return the Thai properly. The more common case however was for programmers to use a simple Statement object for their select and it is in those that the multi-byte strings don't get returned properly.
    The following code shows the problem that I am experiencing. I am basically executing the exact same select in 2 different ways and they are both giving different results as long as the column being queried contains a Thai character. If someone could grab and check it out and let me know if they see the same thing, I'd appreciate it. Just change the column/table name and the username/password/databaseIP to get it to run.
    <code>
    import java.sql.*;
    public class SelectTest {
    public static void main(String[] args) {
    try {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection( "jdbc:oracle:thin:@10.4.31.168:1524:ora8",
    "dms_girouard",
    "girouard");
    String sqlCommand = "select C0620_Title from T0620_SwSheet";
    Statement statement = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    ResultSet resultSet1 = statement.executeQuery(sqlCommand);
    while (resultSet1.next()) {
    if (resultSet1.getString("C0620_Title") != null) {
    System.out.println("resultSet1 Title = " + resultSet1.getString("C0620_Title"));
    PreparedStatement preparedStatement = conn.prepareStatement(sqlCommand);
    ResultSet resultSet2 = preparedStatement.executeQuery();
    while (resultSet2.next()) {
    if (resultSet2.getString("C0620_Title") != null) {
    System.out.println("resultSet2 Title = " + resultSet2.getString("C0620_Title"));
    catch (Exception e) {
    System.out.println(e.getMessage());
    </code>

    Hi Peter,
    Are you using NCHAR column for Thai , or is your database character set set for Thai.
    If you are using a NCHAR column for holding Thai data, then you have to use the
    OraclePreparedStatement.setFormOfUse(...) before executing the select.
    Regards
    Elango. Hi Elangovan,
    Thank you for answering.
    The datatype on the column is VARCHAR2.
    I did my initial tests without doing anything special to make sure the database is localized for Thai, and I was happy to find that almost everything still worked fine - I was able to save and retrieve Thai strings to the database almost perfectly.
    The only problem I discovered was the difference between Statement and PreparedStatement selects on a column containing Thai. Colleagues of mine have said they see the same thing when testing on a Oracle database which has been configured specifically for the Thai customer.
    I read somewhere that the current JDBC drivers are using an older version of the Unicode standard than the most current version of the Java SDK and that it was causing some problems with Korean. I'm wondering if maybe it's the same problem with Thai.

  • How to write two triggers on same table how it works?

    Hello sir..
    I have to write two triggers on same table for auditing different columns of different pages (may be different modules).
    I will have an audit table in which i will insert data such as (user_id,module_id,column_name,old_col_val,new_col_ val,timestamp)
    Now different users from different pages will update the data on same table may be same columns!
    If we write directly, we will not be able to know which column is updated from different pages.
    My question is how can we control the triggers to raise based on the pages

    A trigger is executed whenever the table is inserted / updated / deleted (depend on trigger definition). It won't know what 'page' caused the operation. You can prepare a trigger for one page.
    In order to fulfill your need, you need some way to tell the trigger where you are. There are many ways to accomplish this. Some possible methods are (please check the documents for detail)
    DBMS_SESSION.SET_IDENTIFIER
    DBMS_APPLICATION_INFO.SET_MODULEFor example, you can call DBMS_SESSION.SET_IDENTIFIER to set an ID from your page, and then call sys_context to read the ID back:
    In Page:
    exec dbms_session.set_identifier('Page1');
    ...In Trigger
    pageid  := sys_context('USERENV', 'CLIENT_IDENTIFIER') ;
    ...Note that if you use a connection pool, you may need to properly reset the session information before return, in order to avoid messing up the session information when the connection is used next time.

  • Adding two boxes in same branch group

    Hi,
    I am new to Java3D. I want to add two boxes in same branch group at different location so that both of them are visible simultaneously. Can i achieve it?
    Thanks and regards,
    Rahul

    Thanks.
    But Still i have problem. Probably i was not clear earlier. My problem is not just to add these boxes. But in addition i want to same behaviours like Rotation, Zooming, Translation etc on all of these boxes. So that they all can be zoommed, translated, rotated by equal factor simulataneously.
    Please help me.
    Thanks lot
    Regards
    Rahul

  • When I click "File" and then "New" it keeps opening a new file as a layer and not a background. RGB is selected as the mode.

    When I click "File" and then "New" it keeps opening a new file as a layer and not a background. RGB is selected as the mode.
    With new files opening as a layer and not a background I'm not able to create multiple layers and it wont let me convert the layer to the background.
    How did this happen. I used PS just yesterday and had no problems. Today my computer did mandatory updates and now this.

    Yes. You are using the Ellipse Tool's Pixel option. So it is laying down pixels as it is supposed to do without creating a layer.
    Choose the Shape option:
    Also Layer menu > New Layer creates layers and the curled paper at the bottom of your Layers palette also creates a New Layer. I hope those work.

  • How do I select a color range like in Photoshop OR copy/move a layer into the mask of another layer?

    Hi there,
    I'm trialling Photoshop Elements and wanting to use a black and white (grey scale) layer that I've made as a mask in another layer and don't know how to do it in Elements.  In Photoshop, I'd do this (there maybe a better way in PS to do it, but I haven't discovered it yet)...
    Click the layer i've created that I intend to use as a mask
    Select All
    Copy
    select layer that I want the mask to be applied to
    click the Add Layer Mask button (at the bottom of the Layers window)
    click the mask icon so it is highlighted (and the image isn't)
    switch to Channels view
    highlith the Layer Mask beneath the R,G,B layers and make it visible
    Paste
    make it invisible again
    switch back to layers.
    This works and retains the full range of transparency for semi transparency and soft edges of the mask etc.
    Alternatively, I can select a Color Range, but that doesn't seem to be available in PS Elements.
    So, how do I achieve the same result in PS Elements?
    Thanks for your help
    Jonno

    Perfect!   Thanks very much R_Kelly.  That does exactly what I was hoping to do.
    Cheers
    Jonno

  • Copy Multi-Layered Drawing-Object and keep the same Layers

    Good evening
    We often have to clone a Drawing-Object and the clone should use the same Layers. We expected that we can just select the Objects on the related Layers, Drag and keep a key (e.g. Ctrl) and Drop the copy
    An example:
    The original Object has an rectangle and a text on two layers:
    Layer 1: Rectangle (Original)
    Layer 2: Text (Original)
    After cloning, we should have:
    Layer 1: Rectangle (Original) Rectangle (Copy)
    Layer 2: Text (Original) Text (Copy)
    Thanks a lot for all ideas in advance,
    kind regards,
    Thomas

    Thank you for your fast answer!, unfortunately it does not work as expected: after the Copy-Operation I always have more Layers than before. To use my example again:
    The original Object has an rectangle and a text on two layers:
    Layer 1: Rectangle (Original)
    Layer 2: Text (Original)
    Then I select the Rectangle and the Text an copy these Objects.
    I always get:
    Layer 1: Rectangle (Original)
    Layer 2: Text (Original)
    Layer 3: Rectangle (Copy)
    Layer 4: Text (Copy)
    What I expect after copy is:
    Layer 1: Rectangle (Original) Rectangle (Copy)
    Layer 2: Text (Original) Text (Copy)
    Kind regards,
    Thomas

Maybe you are looking for