Auto-resizing pasted layers to the size of the placeholder

I have designed a number of templates which have placeholders representing where the images will go, and they are sometimes different sizes. I have an action that will select the non-transparent pixels on the placeholder layer prior to using the "Paste Into" command to bring the new image in. Is there any way to use the pixels dimensions of that placeholder (as seen in the info palette) to automatically resize the incoming image to those dimensions? I don't want to have to use the "Fit Image" command on every image prior to copying and pasting.

Here's a tutorial on creating a liquid layout - example shown on a link at bottom of page:
http://www.maxdesign.com.au/presentation/liquid/
Naturally, you are better off following the tutorial, because this way you can learn and won't have to reply on a 'template' to do it every time  :-)
Here are a few open source liquid templates:
http://www.cssliquid.com/templates/
Nadia
Adobe® Community Expert : Dreamweaver
Unique CSS Templates |Tutorials |SEO Articles
http://www.DreamweaverResources.com
http://csstemplates.com.au/
http://twitter.com/nadiap

Similar Messages

  • Resizing images on two layers to the same size?

    OK, it's kind of difficult to explain but what I am trying to do is create posters in pages and I am pasting photographs in there from different layers of the same photo and then resizing them. But the trouble is getting both to the same size, is there an autosnap feature for this or something?
    I find it kind of irksome when I create an image and resize it to a specific dimension in preview then copy+paste it into a Pages document of the same dimensions and it resizes it smaller.
    How do I get it to the same size without manually dragging the corners with my mouse?
    Does that question make sense? Can anyone help?

    Actually I just found a neat way to do it in GIMP (great peice of software BTW) the question remains of how to resize it in Pages...

  • In iPhoto how do I stop files from auto resizing as they import? I don't want my files reduced to 72. The option to choose size on the export menu not suitable for up sizing, as you can't restore the quality removed?

    in iPhoto how do I stop files from auto resizing as they import? I don't want my files reduced to 72. The option to choose size on the export menu not suitable for up sizing, as you can't restore the quality removed.

    Short answer: They are not resizing, there is no quality lost. The dpi is only set when you decide what size you're printing at
    Longer answer:  Dpi means nothing in the digital world of your computer. There are no "inches" to have "dots per..." Size is measured in pixels. That's the same on your camera. It doesn't take 10 x 8 or 6 x 4 shots. It takes shots measured in megapixels. For instance 4,000 x 3,000 is a 12 megapixel camera.
    Using that example, that shot from that camera has 12 million pixels. So that's how many "Dots" there are. To decide the ratio of dots per inch, you now need to decide the "inches" part. And that's printing. Print at 10 x 8 and the dpi will be 4,000/10 or about 400 dpi. At 6 x 4 then it's 4,000/6 or 660 dpi. Work the other way: Print at 300 dpi and the resulting image will be about 13 inches on the longer side.
    So, your photo as a fixed number of pixels. Changing the dimensions of the print will vary the dpi, changing the dpi will vary the dimensions of the print.
    For more see http://www.rideau-info.com/photos/mythdpi.html
    Regards
    TD

  • Pasting into Photoshop CS5 + Auto Resize

    We copy a lot of existing elements from illustrator files into existing Photoshop documents. The dimensions of the Illustrator files are much larger, so we've always pasted into Photoshop and it resizes to the smaller photoshop document.
    When I paste into the existing Photoshop document in CS5, I need the image/object to resize to my Photoshop document, instead of pasting in at the actual/original size.
    Is there something I can change in preferences? Or a way to do this?

    Yes many Photoshop users that know they know how Photoshop Place and Paste work. Even when they do know. Their actual understanding may not comprend the whole story yet. For they have may not had to seen all the variations of Place and Paste and haven't given the subject deep thought.
    A lot has to do with size.   Many users think about size differently for there are several sizes when it comes down to it..   When Photoshop documentation states size its best to think "Print Size" You know this has to do document resolution and the number of pixels in the document. It what make the physical print size    When images are Pasted and Placed into some other document Photoshop maintains the new layers  "physical print size"  If the two document do not have the same resolution the image going into the document will be scaled to the receiving document resolution it does not mater how your Photoshop preferences setting are set.  There will be scaling size change made.   The result may or may not fit within the receiving documents canvas.  In the case of place if what is being place in does not fit. What does not fit may be scaled to fit within the receiving document canvas size.  Place images are smart object layers and the object pixels are the original ones for the object.  All smart object layers have a single transform associated with them. This transform may or may not scale the original image.   Image that have the same resolution may just be scale to 100% and have not change in number of pixels.  When the object being place is larger the canvas size depending on the Photoshop's Preference Place object resize option the object may be resized to fit within canvas its print size will be different then the original object.  Its only when you have been puzzled by some Photoshop's Places and Paste operation that you deepen your though process and inveterate the subject thoroughly that you see the whole story
    Target a placed in image smart object layer  and use the free transform shortcut key to see the current associated transform. Look in the option bar at its scale setting it may surprise you.
    I will admit my knowledge was very faulty till I started scripting place and had to deal with how Photoshop did the operation. I had a lot of problems till I realized what was happening. I then realizes that I could scale the placed object to 100% get it back to its original pixels then transform these pixels to where I needed them to be and scaled to the size I needed.
    As wrote I don't have AI. Since AI is an Adobe product  when you use copy in AI and paste in PS  I can beleive that Photoshop may well know that the clipboards contents were copied there from AI and Photoshop may give you options like to use paste or place.   I would think any resizing done to the clipboards pixels is done by Photoshop not AI.
    Message was edited by: JJMack

  • How to avoid auto resizing the JPanel

    I have JFrame as main window. This JFrame consist of statusbar at the bottom of the JFrame. The statusbar has implemented as a panel that uses BorderLayout. This statusbar has two JPanels as children.
    1) the first child panel(label panel) has 3 labels on it.
    2) the second child panel(image panel) has only one label with a image and this second panel is added to statusbar to the next of the first child.
    3) all panels use BorderLayout.
    If I resize the JFrame by dragging its right border (right to left) both the panels on the statusbar are auto resizing. But I don't want to resize the image panel on the statusbar. I mean even if I resize the frame the size of the image panel should not change. It has to always visible completly.
    Any help is heighly appreciated.
    Regards
    Venkat

    There could be several different ways to achieve this, but it all boils down to using appropriate layouts and/or preferredSizes.
    The Java™ Tutorials: [Laying Out Components Within a Container|http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html]
    db

  • How can I disable the auto resizing in NetBeans?

    Hello,
    how can I disable the auto resizing in NetBeans?
    I cannot resize nor displace components due to this automation.

    first what do u mean by auto resizing ? if u mean the layout that automatically aligns itself then ..... if that's yr question then u need to set the layout to null
    if using netbeans then right click on the the mainPanel and setlayout to null if eclipse the frame.getContent.setlayout(null);
    NetBean doesn't have a forum it has mailing list u can subscribe there
    http://www.netbeans.org/servlets/TLogin
    Edited by: raven_roy on Mar 12, 2008 2:58 AM

  • JTabbedPane, switch of auto resizing of the tab header possible?

    Hi,
    Is it possible to prevent the tab header from auto resizing?
    In this code the tab "Page 1" fills the whole row at start up, but I would like to prevent it from taking more space than needed.
    import java.awt.*;
    import javax.swing.*;
    class TabbedPaneExample
            extends     JFrame
        private        JTabbedPane tabbedPane;
        private        JPanel        panel1;
        private        JPanel        panel2;
        private        JPanel        panel3;
        public TabbedPaneExample()
            // NOTE: to reduce the amount of code in this example, it uses
            // panels with a NULL layout.  This is NOT suitable for
            // production code since it may not display correctly for
            // a look-and-feel.
            setTitle( "Tabbed Pane Application" );
            setSize( 140, 200 );
            setBackground( Color.gray );
            JPanel topPanel = new JPanel();
            topPanel.setLayout( new BorderLayout() );
            getContentPane().add( topPanel );
            // Create the tab pages
            createPage1();
            createPage2();
            createPage3();
            // Create a tabbed pane
            tabbedPane = new JTabbedPane();
            tabbedPane.addTab( "Page 1", panel1 );
            tabbedPane.addTab( "Page 2", panel2 );
            tabbedPane.addTab( "Page 3", panel3 );
            topPanel.add( tabbedPane, BorderLayout.CENTER );
        public void createPage1()
            panel1 = new JPanel();
            panel1.setLayout( null );
        public void createPage2()
            panel2 = new JPanel();
            panel2.setLayout( new BorderLayout() );
        public void createPage3()
            panel3 = new JPanel();
            panel3.setLayout( new GridLayout( 3, 2 ) );
        // Main method to get things started
        public static void main( String[] args )
            // Create an instance of the test application
            TabbedPaneExample mainFrame    = new TabbedPaneExample();
            mainFrame.setVisible( true );
    }Edited by: user6102378 on 2010-okt-07 06:51

    Unfortunately, the answer seems to be "no" - looks like the exact behaviour is even different across different LAFs. Nothing short of re-writing the layout code in the xxTabbedPaneUI will help.
    Just curious: how comes that we have so many tabbedPane related questions recently?
    Cheers
    Jeanette

  • How to auto insert a number array with size of 20 into a named excel file with the positon is from A1 TO A20?i use lv6.1

    can you give me a example vi for it ?thanks a lot!
    how to auto insert a number array with size of 20 into a named excel file  with the positon is from A1 TO A20?i use lv6.1

    You don't need us to give you an example, as the example already comes with LV. Go to Help>>Find Examples and search for "excel". You will find an example called "write table to XL". You should note that the example doesn't do that exactly, because it writes a 2D array from 2 to N.
    You can modify the example by using only one for loop (instead of nested loops) with a 1D array or by going into the Set Cell Value and modifying it to accept a second cell value for the Cell2 terminal and wiring in a 1D array instead of the single string. If you do modify it, be sure to save it under a different name, so you don't overwrite the original.
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!

  • A link in a thunderbird message fails to activate firefox but if i copy & paste it in the ffx location bar, it goes to the linked web page

    a link in a thunderbird message fails to activate firefox but if i copy & paste it in the ffx location bar, it goes to the linked web page. Also, some web page links are failing except that some will work if i use right-click with open in new tab. just updated ffx to 3.6.13, then updated java per mozilla notification (plugin checker)

    Hi Larry,
    Thanks...that was one of the things I first tried. I did a save as another document.
    I also resized the image in PS so it would be at 100% of size, figuring that would help and I made the image box's background white instead of none, but nothing so far.
    It almosat seems like it is coming from the origianl template file?
    Babs

  • JTable in JScrollPane auto resize refresh problem

    Hello,
    I have a JTable in a JScrollPane. Number of rows is changing.
    I'm using the following to auto-resize JScrollPane.
    public Dimension getPreferredSize() {
                  Dimension size = super.getPreferredSize();
                  size.height -= getViewport().getPreferredSize().height;
                  Component view = getViewport().getView();
                  if(view != null)
                  size.height += view.getPreferredSize().height;
                  return size;
             }There is a JButton, which adds an empty row to the JTable. It all works fine, except the auto-resize when a new row is added. I want all rows of JTable to be visible, with no scrollbars present. I tried repaint(), revalidate(), addNotify(). What should I do?
    Thanks.

    Sure
    DefaultTableModel dtm = new DefaultTableModel(vec, header);
              jt0 = new JTable(dtm);
              jt0.getTableHeader().setReorderingAllowed(false);
              jt0.setFont(new Font("Tahoma", Font.PLAIN, 12));
              jt0.getTableHeader().setFont(new java.awt.Font("Tahoma", java.awt.Font.BOLD, 12));
              jt0.setRowHeight(18);
            jt0.setPreferredScrollableViewportSize(new Dimension(500, jt0.getRowCount() * jt0.getRowHeight()));
            jt0.setFillsViewportHeight(false);
              jsp0 = new JScrollPane(jt0);
    GridBagConstraints gbc = new GridBagConstraints(); 
            gbc.insets = new Insets(2,1,2,1); 
            gbc.weightx = 1.0; 
            gbc.weighty = 1.0; 
            JPanel p0 = new JPanel(new GridBagLayout()); 
            gbc.fill = gbc.HORIZONTAL;
            p0.add(jsp0, gbc);
              JButton jb1 = new JButton("add row");
              jb1.setSize(40, 18);
    jb1.addActionListener(new java.awt.event.ActionListener() {
                   public void actionPerformed(java.awt.event.ActionEvent e) {
                        dtm.addRow(new Object[]{....});
    //                    jt0.scrollRectToVisible(jt0.getCellRect(jt0.getModel().getRowCount()-1, 1, false));
    //                    jt0.setRowSelectionInterval(jt0.getModel().getRowCount()-1, jt0.getModel().getRowCount()-1);
        public class SizeX extends JScrollPane {
             public Dimension getPreferredSize() {
                  Dimension size = super.getPreferredSize();
                  size.height -= getViewport().getPreferredSize().height;
                  Component view = getViewport().getView();
                  if(view != null)
                  size.height += view.getPreferredSize().height;
                  return size;
        }

  • Auto-resizing all components

    Is there a method that auto resizes all components on a JFrame when it is maximised for example. I have got a JTable (in a scrollpane) and some other components on a panel. I have sized the frame to be approx 80% of the screen size. When the frame is maximised, the table and the other components retain their original size (understandably so!). Is there a method available that can resize the panel and its components to resize accordingly when the frame is maximised?...I know I can add the componentListener and implement a method in the componentResized() method...but I dont want to duplicate stuff that's already available. Thanx for your help.

    I don't know the specific needs.
    BorderLayout: simple Layout; Components are oriented NORTH, EAST, SOUTH, WEST
    FlowLayout: all components are added after the other
    GridLayout: components are oriented in a grid
    GridBagLayout: complex once
    See the Java Tutorial for more information.

  • Auto Resize Text in a Text Box

    How do you make the text inside of a text box auto resize to fit the box I'm typing in?
    I have a text box with a list in it. I change this list everyday and like the text to fit the box. The size of the text doesn't matter. If I have a long list, I don't mind that the font is small. If I have a short list that day, I don't mind that the font size is then big. Hopefully I am making sense. I used to use text boxes like this in MS Publisher and am assuming I just need to find a setting change in Pages.
    I do this often enough that it would save time not having to keep guessing the correct font size until it fits properly.
    Thanks!
    Message was edited by: mnbinth

    mnbinth wrote:
    I used to use text boxes like this in MS Publisher and am assuming I just need to find a setting change in Pages.
    Assuming that application B will behave the same than application A is always a bad idea.
    There is no reason for such a guess.
    Happily, all engineers aren't thinking the same way and remember Apple's statement :
    *_Think different !_*
    Yvan KOENIG (VALLAURIS, France) samedi 25 septembre 2010 10:55:56

  • 'Auto resize image' 'Settings' dialog box controls

    I have a signature that contains an avatar image (size 120px by 120px)
    Every time I 'Send' an 'Auto Resize Image' > 'Settings' dialogue box pops up
    How can I bypass this as its becoming annoying.
    Most emails (98%) do not contain any other embedded or attached images.
    This only started to happen after upgrading to latest version of Thunderbird, was never an issue before.

    Doesn't sound like a standard Thunderbird pop up as I've not come across it.
    Do you by any chance have an addon /extension such as Auto Resize Image?
    * https://addons.mozilla.org/en-US/thunderbird/addon/auto-resize-image/
    if yes, disable it and retest to see if message stops.
    Check you are using an up to date version.
    check to see if there is some settings you can use to 'not ask again' or similar. Can't say exactly as I do not use it.
    I use the standard TB settings to adjust for sizing when I originally insert an image.

  • Auto resize columns.

    How can i get finder to auto resize my columns in columns view?
    (I know how to option-click resize them)
    best...Jan

    to resize the grey bar on the left, all you need to do is move the arrow to the line on the edge of the box, the far right line and the little symbol that allows you to adjust windows appears and then you can adjust it to any size of your preference. as for the auto-sizing columns, i don't even know how to change the size so i wouldn't know how to auto size it...sorry. hope that helps
    regards,
    thealexness

  • Auto-resizing JPanel  on mouseEntered

    Hello,
    I am looking for a little advice. I want to try and make a JPanel resize on mouseEntered. I want the JPanel to be be almost hidden until the mouse is over and I want it to grow in size gradually rather than appear instantly. The Panel will share space with a JEditorpane which will occupy the majority of the space but resize to allow to the JPanel to grow in size.
    --Hidden
    ///////////////////////////////////////////////////////////////////////////////////// - Base panel
    ////////////////////////////////////////////////////////////////////////////////////// - JPanel almost hidden
    /                               JEditorPane                                             /
    ////////////////////////////////////////////////////////////////////////////////////// - Base panel
    --On Mouse Over
    /////////////////////////////////////////////////////////////////////////////////////// - Base panel
    /                          JPanel now showing                                 /
    /                         JEditorPane                                                  /
    //////////////////////////////////////////////////////////////////////////////////////// - Base panelThe JPanel will start of with a height of say 5 and when the mousentered event is fired it will grow over the space of half a second or so to a height of about 80. When the Mouse exists I want to to go back to it's original position.
    I have seen this technique used on some desktop applications I have used in the past and I would like some advice on how best to accomplish this in Swing.
    Has anyone done this before, or if not which way might it be possible?
    I am not expecting code, just some ideas on an approach. I am not really that good when it comes to Swing.
    BTW, I have tried already with a JPanel as the base panel and a JLayeredPane but the JPanel I wish to resize ignore the calls to setSize, possible becuase it has various components embedded on to it.
    Cheers.

    BTW, I have tried already with a JPanel as the base panel and a JLayeredPane but the JPanel I wish to resize ignore the calls to setSize, possible becuase it has various components embedded on to it. When using JLayeredPane, the trick would be to use setBounds( ) instead.
    Basically to achieve this you would need a simple javax.swing.Timer and the necessary MouseListeners. Consider creating a subclass of JPanel where you will attach the listener code. Once, the mouseEnters, you'll probably need to set a boolean which indicates that the panel should grow, and fire the Timer. The Timer's actionPerformed method should check the boolean to determine whether to grow the panel or shrink it. The changes to the panel should be done through setPreferredSize( ).
    Consider removing all the items in the Panel before shrinking and re-adding them only when the Panel is fully grown. This may help improve performance.
    This feature may cause your application to suffer a bit in terms of appearance when the panel growing or shrinking unless a suitable LayoutManager is choosen. Cant suggest any unless I try it my self.
    ICE

Maybe you are looking for

  • Supplier Network Collaboration : Implementation pre-Steps

    Hi All, I am looking for some important pre-steps/Knowledge , which i need to understand for implementing the SAP SNC at customer end. I have got a theoretical knowlege of all the business process in sap SNC and also i have gone thru the SAP SNC Conf

  • My hard drive crashed and i reinstalled itunes

    when i reinstalled itunes to my computer i cannot access the music or videos that have already been synced to my ipod. is there a way to get the existing music back into itunes.

  • Bridge CS6 Cache problem

    Have installed Photoshop CS6 and in using Bridge I get the message "Bridge encountered a problem and is unable to read the cache. Please try purging the central cache in Cache Preferences to correct the situation". If purge the central cache as instr

  • Keyboard shortcut for selecting point on curve?

    Before CS4 you use to be able to hold down the command key, at least I think it was the command key, while you have a curve open and you could see where you were on the curve, then click with the mouse to select that point. Now you have first click o

  • Help Me Urgent...Error: "Could not find the main class. Program will exit."

    Am using Eclipse 3.3.2 I have a project called: SWDS Initially i have JDK1.6 installed in my system. At this time the project is running succesfully. But when i removed(uninstalled and environment path also removed) JDK 1.6 and installed JDK 1.5 and