Get/apply the canvas size

I do some scripts cleaning for some processes of photoshop where I work and thought in a way to eliminate the duty change actions but am not sure that the characters used to perform actions.  What I need is a script that will get the size of the canvas of a single document (I'll call him original.psd for easy reference) and apply it to another document without damaging or resize the layers (I'll call her what a target.psd).

I already have most of the script, so I just need the lines that will be

(a) get the canvas of original.psd size and

(b) applies that the canvas size to target.psd

Thanks in advance for any help!

DGolberg

Need a script to a document of reference before you can work with it. You're not telling the order, that the images have been opened or their names. The code below will get the size of the canvas of the first open document and apply it to the second open.

var w = app.documents[0].width;// the width of the first open document
var h = app.documents[0].height;
app.activeDocument = app.documents[1];// make sure the second open document is active
app.activeDocument.resizeCanvas (w, h);

If you want the order of the just switched document exchange the 0 and 1.

Tags: Photoshop

Similar Questions

  • Resize an image to fill the canvas size according to height?

    Hi guys,.

    Is it possible to resize a picture to fill the canvas size according to height?

    Currently when I place an image, it fits on width, being a landscape on a canvas portrait image I need to fill the height.

    Any suggestions on the best way to do it, maybe an action?

    Thank you

    Gavin

    If the image containing or the picture may vary in dimensions/dimensions a Scripting approach would seem prudent.

    In the contrary case, a conditional Action may be enough.

  • Cropping + change the canvas size

    Hello

    I have a problem (because I'm a beginner in Photoshop), and it's that when I crop and image and try to change the canvas size - change the size because I use a different type of paper - (and anchor the image to the top left), the image looks like the way she was before harvest. Is there another way to do this? I'm doing it wrong?

    Thank you

    Try to use the tool of rectangular selection to a fixed size: 4 in. x 6 in.

    Move the selection where you want it to be.

    Select > Inverse

    Remove.

  • Script in Photoshop Actions for the canvas size?

    I have a variety of sizes of illustrations I want to post on my site;  that would take much less time if I could add a white border in Photoshop Actions by increasing the size of the canvas by 1/4 inch.  Thanks for your suggestions, BAB.

    Save a step size of canvas.  Leave the anchor point at the Center. Check relative and the value of 1/2 inch in width and height.  Photoshop will calculate the number of pixels needs to add to increase the width and height 1/2 "and add 1/4-inch canvas on all sides.  If there is a background layer in Photoshop the extra pixels will be 100% opaque and the color can be set in the canvas size dialog box. Can be set to the color of the background sample.  If there is no background layer, the added canvas will be empty.

  • The canvas size

    Is it possible that I can set the size of the canvas, so that I can create illustrations of size to the dimensions of the final product?

    Thank you

    Hi Huhma

    Sorry for taking so long to answer. Currently there is no way to customize the size of the canvas to draw to the fate, but if this can help at all, when the output image, the work is made based on the current zoom and exported file always has dimensions of 2048 x 1536px for iPad and 2732 x 2048 for iPad Pro.

    Hope that helps a little.

    Sue.

  • Should what the canvas size I use for my project of e-Learning 8 Captivate?

    Hello world!

    The maximum size of my e-learning project is 740 x 555, so that it can adapt to the size of the LMS. E-Learning has a Table of contents and the skin Editor, but of cause I want to use as much fabric as possible.

    It's been a while since I worked with Captivate and has a fragile memory of the published version adds a few pixels. Is it still OK for 8 Captivate?

    Canvas size what do I use to make e-Learning made the LMS, but always include the Publisher of skin and OCD?

    ARO

    Madeleine

    Are you talking about a normal or sensitive project? Is the table of contents separate or overlay? If it is separate, it will add 250px width if you change the width of the table of contents that is now possible. Ditto for the playback bar: is that overlay or not? If this isn't overlay, the number of pixels added to the height depends on the chosen playback bar. You can check its height by looking at the width of the bottom border in the skin Editor. This lower border fits the selected playback bar.

  • Change the image format for the canvas size

    Is it possible to lock the aspect ration when you change the size of the canvas to export as?  I used to use this Save permanently for the Web that I note is now labeled "Legacy".

    Hi Robert,.

    The number of pixels for the width or height should change when you change a to maintain proportions. Here is a video of what happens.

    https://www.dropbox.com/s/x125ei4k5m8o8we/quickWidthChange.mov?DL=0

    If you don't see this behavior, perhaps you run into a bug. If this is the case, please share your PSD (if possible) and let me know what you're trying to change the size.

  • Can touch PS change the canvas size?

    Subject says it all.  Sometimes I need to change the size of the canvas, essentially making the bars that I would fill a color.  PS touch it?

    Thank you.

    You can increase the size of the canvas using the crop image tool under the & button.

    If you enter a size larger than the size of the original image, it will create a transparent border of the image that you can fill with a color of your choice.

  • Change the canvas size to be smaller, is actually making it larger?

    Hello

    OK, I changed size of the canvas a thousand times in my life and this has never happened before.

    I have an image that is 1600 px wide and I want to cut the sides to 1260. When I start to type even in the smallest size, the size of the file indicated is greater (that was my first hint that something was wrong). And of course, it is making the bigger picture?

    This was happening to anyone else?

    Thank you

    Babs

    You have "Relative" verified by chance?

  • How to hold the canvas size constant?

    When I scale upwards, the area of the original image is hidden by enlargement.

    In fact, enlargement covers everything and goes to the edges display pane.

    I want to keep seeing the same canvas size.  I am also

    worried that the output size and the area will be changed now.

    Anyone?

    Thank you

    Steve Z denver

    Yes. You can actually remove the clip you can create the new sequence, and then click anywhere in the timeline on your original sequence, then Ctrl / Cmd + A to select the entire document and copy and paste it in the new sequence.

  • Blind Presenter: apply the font size to all slides

    Hi all!

    Keynote is a great tool for blind people create presentations; It works very well with the Apple own screen reader, VoiceOver.

    I have a few questions for you guys. your answers will make my workflow much more effective.

    (1) I know, use the minimum font size is 30. How many characters will fit online?

    (2) I've copied the text in a text document in a slide; of course, the font and size are not the same. Can you assure me that all fonts and sizes remain the same throughout the presentation?

    (3.) I have a table of 5 x 5 with numbers on a slide. I was told by sbd. who could read but not edit the documents Keynote (with Open Office) as the table is readable, but could be many, many more great. Is there a way of self-centring a picture so that it fills the slide?

    any ideas would be very appreciated. Thanks & best regards, Markus

    I regularly create educational materials for students with visual impairments through audio recordings.

    I can't imagine the challenge for blind people, creating material with Keynote.     I hope that the following remarks are useful as a point of departure if nothing else.

    I know, use the minimum font size is 30.

    In fact, the font size must be determined by the final product, which the spectators and the environment where the presentation takes place. Text at the point indicated 30 in a conference room is far too small to be legible, 30 points may be appropriate when sitting in front of a screen of 2 feet farther.

    How many characters will fit online?

    This, once again, must be determined by the final product, and not the number of characters can be demonstrated. What is really important is the number of words on a slide, not the number ofcharacters.

    The number of words that are easy to read on a projection screen in a small training room will be different for the number of words that are easy to read in a web browser on a computer screen.

    The rule for text created by professional designers on television broadcast as well as projected communications is a maximum of five words per line and 6 lines per page, a maximum of 30 words per slide. For example, in Europe, there are legal requirements imposed on broadcasters for viewers to read text easily.

    I copied the text to a text document in a slide; of course, the font and size are not the same. Can you assure me that all fonts and sizes remain the same throughout the presentation?

    Use the dough and the Style of game in the edit, the keyboard is shift option order V

    the table is readable, but might be much, much more. Is there a way of self-centring a picture so that it fills the slide?

    Select the table, and then increases the font size of the required amount.

    I am happy to answer questions about my answer.

  • The canvas size is different from the program compared to when it is downloaded somewhere?

    I just downloaded photoshop through cloud creative adobe, and when I started to work on something, I thought it looked a little small. I have advanced and transferred the progress on something, I got, and he transferred a lot bigger. Here's a screenshot for comparison between an image at its normal size and how it looks in photoshop to says what photoshop is 100% of the size.

    Screen Shot 2014-10-28 at 10.23.10 PM.png

    Is there a reason that this, and is there a way to fix it? I don't know if it's something to do with photoshop or the settings of my laptop. I currently have a MacBook Pro with a Retina display.

    With regard to comparing what it looks like to help adapt to screen or screen fill can be useful. But frankly photoshop did not really a pixel for zoom level setting to make sure it is the same size on another monitor. You can temporarily affect the resolution of the screen a smaller frame. But for the web, which is sort of defeat the purpose of the band. Images are supposed to be fluid (percentages) not fixed (pixels) so it seems good on all monitors.

    Knowing this would mean it would evolve different depending on the monitor with no real way to check his look.

    As a work-around, most browsers can now change the layout of the web page to a fixed screen size. Even for programs like Dreamweaver web design. So all is not lost.

    It may be worth your while to make a feature request. Ask if they could add methods of simulation of monitor or adjustable zoom by pixels.

    Community customer Photoshop family

  • Is it possible to get around the maximum size of 32 GB with using ASM?

    Just curious if someone know a way to create a file of data larger then 32 GB with using ASM on Oracle 10.2.4.0 (Windows platform).

    We prepare to migrate a server and we would like a data file larger and unique rather than add data files to the storage space that fail us. We have to 1.9 in use and we plan to use the majority of it creating the 32 GB data files would be pain.

    I googled for info but had no chance. Any help (yes even the links of http://lmgtfy.com/), info, tips or pointing me in the right direction would be greatly appreciated.

    Thank you
    Bruce

    [BigFile Tablespace | http://www.oracle.com/technology/oramag/oracle/05-jan/o15dba.html]

  • Rendering of the canvas deteriorates proportionately with the size?

    Can someone explain to me how I can avoid the drop in performance of drawing on a canvas, as its size grows?
    What is the reason for this?

    Run even on a canvas runs more slowly, as the canvas size.

    It also seems that, despite "dirty zone" rendered using JavaFX technology, rendering the scene becomes slower as the size of nodes increases (e.g.: the canvas).
    even if most of it is off-screen. Speed is acceptable when the canvas completely fills my screen size, then the entire screen should already be redrawn.
    but as I increase the size, so the node/canvas already extends outside of the window, made performance continuously decreases as the node expands.

    It is corrected, when setCache (true) is applied.
    However, this does NOT improve drawing performance on the Web, where low latency is essential for a painting application.
    Who seems to be involved, as the documentation advises NOT to Cache, if the node changes frequently.
    Surprisingly then, still cached to True on the Web currently drawn on, more CacheHint = SPEED, seems to improve a little speed.

    Anyway, back to the question: why is based on a painting becomes slower with the size, although the same race, covering the same amount of area, is performed?

    My apologies if I seem confused or repeated myself, I am extremely tired. Thank you in advance and good night.

    It's a beautiful Shindoh descriptive answer.  You have a talent for this sort of thing.

    Reproduce your problem

    Your application does not work even on my machine (Java 8u5, Win 7, 64 bit, ATI Radeon HD 4600), except if I drop the size of the canvas to 8Kx8K (probably because I use an older graphics with capabilities of textures limited).  I drop the size of the canvas, I noticed improvements in performance that outline you, 8 k is really slow to update and pretty unusable at 1 K being quite catchy.

    The exception I get a canvas of 10Kx10K is =>

    java.lang.NullPointerException

    to com.sun.javafx.sg.prism.NGCanvas$ RenderBuf.validate (NGCanvas.java:199)

    at com.sun.javafx.sg.prism.NGCanvas.initCanvas(NGCanvas.java:598)

    at com.sun.javafx.sg.prism.NGCanvas.renderContent(NGCanvas.java:575)

    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2043)

    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1951)

    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:225)

    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:575)

    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2043)

    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1951)

    at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:469)

    at com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:324)

    at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:89)

    to java.util.concurrent.Executors$ RunnableAdapter.call (Executors.java:511)

    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)

    at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:617)

    to com.sun.javafx.tk.quantum.QuantumRenderer$ PipelineRunnable.run (QuantumRenderer.java:129)

    at java.lang.Thread.run(Thread.java:745)

    A few suggestions

    10Kx10K is a very large canvas.

    Creation of such a thing is a really a kind of brute force solution.

    I think that you would need to get smarter about manage you such situations.

    In my view, relying on the library to manage the optimization of these paintings is not the way to go.

    Of course, the library can handle OK, but your tests show otherwise, so you'll have to work on a different solution.

    What you can do, is take some knowledge of the specific area of your application to help optimize the use of the canvas so that you can get with a smaller canvas.

    For example, consider the technique involved in the drafting of an engine of tile in JavaFX. It is average for the rendering of graphics games such as Pokemon or Zelda on a canvas, old-school style.  There is a support data format that is the TileMap, there are control logic that keeps track of the coordinates of the currently visible TileMap and there is a rendering engine that makes just the coordinates of tile currently visible on the screen.  You can apply a similar approach to your application - this would allow you to limit the size of the canvas limited to just the size of the portion of the visible screen.  Of course the nature of TileMaps make them especially well optimized for this approach, so the solution is not directly transferable to your application.

    Another project that demonstrates rendering an area almost infinitely great is the Grezi project that defines a JavaFX zoomable user interface, although it uses the SceneGraph and not canvas for this.

    The question may be "why should I should I put the extra mention, more complex logic in my code to draw effectively on a canvas? ' that is ' Why can't the library take care of these things for me?  I think the answers are:

    1. the current implementation of the Web on various platforms may not completely optimized for the treatment of the dirty area and overflow in the visible region to the areas off the screen.

    2. the implementation of the Web cannot make use of any domain specific design optimizations that your application may be familiar with.

    3. you qualify for an architecture of MVC type for your design in any case.

    4. the needs of canvas to deliver a very versatile solution that makes it work well in many situations, but may be not optimal for your particular situation.

    See for example-online the best optimizer is between your ears.

    You might want to try another option is to use the SceneGraph instead of a canvas.  The optimization of the library around the larger scene graphs and area sale/offscreen surface treatment can be more effective in the case of SceneGraphs compared to paintings, particularly in the case of graphs of scene quite sparsely populated.

    No matter what you do, if you want to render the box for 4 K screens, I think that JavaFX (and even some of his other computer pipeline components such as native libraries, drivers graphic, material interfaces screen etc), are not particularly well optimized for the treatment of these high resolutions at the moment.  This is likely to change over time, but expect problems of teeth if you try to make these resolutions at the moment.

    Another thing that I remember is that, to a lesser degree, JavaFX makes often content to the textures on a video card.  Most video cards have some sort of limit to the maximum size of texture and when this limit is reached, to do a layer of additional conversion somewhere in the library code that maps the content to several textures video card and when this way of rendering is called, things slow down significantly.  This limit may be generally around 8Kx8K 4Kx4K (I'm not sure).

    My guess is that this is probably not the answer you wanted ;-)

  • The guard canvas size repeat everything that is entered

    Hello

    I don't know what the devil case is, I was resizing images for the web and apply a border to background and have done this for days, including today... then, suddenly, change and do nothing at all, I'll add the size of the canvas, and this for a reason any is like doubling what that is the devil I'm typing!  And I can't seem to stop and again - don't know why the hell it is annoyingly do that after my sitting here and do it for most of the afternoon and it works normally!

    What I do, I import the images, directly from Lightroom, adjusting the size of the Image file full resolution edited, like saying 9 "long at 108ppi.  And then I open the canvas size and am simply add a small border of. 125 "in width, and. 25 "down to apply the image as an icon of the logo.  And as I said, it worked normally until half an hour ago, where for some stupid reason, is it like a 6,125 "x 9.25" entry and creating a 12.25 "x 18.5" canvas!

    One thing I noticed when he started to do so, the dimensions of the image all of a sudden not displayed already in the entry fields, but just showed 0.  I liquidated and restarted the program a few times, nothing helped... and even went in and the news that update 14.1 apparently even who keeps popping up every day, and nothing has changed with this new problem frustrating.

    Any ideas or suggestions?  I would be grateful, because I have work to do!  Thank you for your time and any help you can give.

    Jeff

    Is it as simple as you have the 'Parent' box checked?

Maybe you are looking for

  • Question from Darren Chaker encryption

    Greetings, Anyone know the literature on complete encryption of the disk used by Apple? As a fan of Apple, would like to know if the military-grade encryption. Thank you for your response (s).

  • Boot loop

    Hi while watching a movie of my yoga Tablet 3 3 months old it just turned off and is now stuck in a loop. I have tried that reset, I get to the screen, but it won't let me select anything that a TI maintains just reboot? He had 60% battery left

  • Can not find the drivers for the Ethernet controller + Audio

    I just reinstalled windows XP Professional on my HP Pavilion Slimline s3500t PC, the operating system is vista before. However I can't find drivers for Ethernet: RTL 8211 B (10/100/1000 Mbit) MCP73 Ethernet and Audio: Realtek ALC889A MCP73 High Defin

  • CPU usage. Difference between VsPhere and Zabbix data.

    I have the following problem: when I get maximum use of the processor (for the last 30 days) via PowerCLI, I maximum 58%, for example. But Zabbix tells me, that maximum usage was nearly 100%! What value does not? Is it possible to convert data from V

  • How can I uninstall the Windows updates?

    my computer became very slow after installation fails Windows updated!