Resizing Image Window in Photoshop using Javascript

I write many scripts using the ScriptListener as my base for obtaining my scripts. One of the steps I need is to resize the Image window so I can properly place a logo on an image. When I resize the image using File>Automate>Fit Image. The Image Window shrinks down and I have to use Control 0 or Command 0 to resize the image window to be able to view a larger image on the screen to place the logo.
This is the Image Window Size after File>Automate>Fit Image
I need ot make the Image Window Larger using Control or Command 0
ScriptListener does not record this step of Control or Command 0.
Is there a script that anyone knows that does this?
It would be a great time saver if there was.
Thanks in advance for assisting me.
WorkflowMaster

Hi Workflowmaster,
Can you check the below mentioned script for your solution...
I think it can be works.......
- yajiv
Code :
Fit_ON_Screen();
function Fit_ON_Screen(){
        var idslct = charIDToTypeID( "slct" );
        var desc64 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
        var ref44 = new ActionReference();
        var idMn = charIDToTypeID( "Mn  " );
        var idMnIt = charIDToTypeID( "MnIt" );
        var idFtOn = charIDToTypeID( "FtOn" );
        ref44.putEnumerated( idMn, idMnIt, idFtOn );
        desc64.putReference( idnull, ref44 );
        executeAction( idslct, desc64, DialogModes.ALL );

Similar Messages

  • How to get image properties in PDF using javascript or plug ins

    Hi
    How to get the image(all the images) properties in PDF using javascript or suggest plug ins
    Thanks in Advance

    HI,
    In the PDF Edit API's ( as has already been suggested) there is the PDEImage and using this you should be able to find out everything you need to know about any image in a PDF file.
    I would recommend starting with PDEImageGetAttrs
    Hope this helps
    Malcolm

  • How to get image properties in PDF using javascript

    Hi
    How to get the image(all the images) properties in PDF using javascript?
    Thanks in Advance

    Hi
    Thanks for your quick response. Any recommended plug ins
    Thanks in advance

  • Photoshop uses JavaScript to load open documents into the Match Color command

    Hello,
    I am a production artist and I make use of the Match Color command quite a lot in my work. I often have 6-10 Photoshop documents open and one of them is designated as my master document. With this document active, I launch the Match Color command. Inside the Match Color dialogue, I load one of the other open documents into the Source drop-down menu under Image Statistics. I click Ok, and save the master document under a new name. I have to repeat this for all other open documents. Needless to say, it gets tedious.
    I started to write a script to automate this, but I cannot find the syntax for the Match Color. I have the Adobe Photoshop Cs6 Javascript Scripting Reference but have been unable to locate it in this PDF. I tried looking online, but no luck. Does anyone know what syntax to use as well as associated properties / methods?
    Thanks for any assistance.

    What we do is we make seamless images from product photos supplied by retailers in the flooring industry (carpet, tiles, etc). The seamless image gets loaded into a virtual room scene powered by Adobe Scene7. Scene7 takes the seamless image and duplicates it horizontally and vertically, in 3D perspective, so the final rendering looks like one continuous product image. Check this link to see an example:  http://sitesetup.creatingyourspace.com/wlhhbw4/designcenter/vrddesign.aspx?room=2854 The thumbnails on the left side are seamless images. click on one and it will load into the virtual room.
    When I make seamless I may encounter 20-50 images of the same product, but different colors. Rather than spend 10-15 minutes per seamless, I make one and then let Match Color do the rest. Match Color is a great tool for this application. If destructive editing were an issue, the layer could simply made into a smart object, but we're not concerned about that.
    I did try the javaScript listener. Below is the code it generated. I'm new to JS so I don't understand all of the syntax.
    // =======================================================
    var idmatchColor = stringIDToTypeID( "matchColor" );
        var desc7 = new ActionDescriptor();
        var idLght = charIDToTypeID( "Lght" );
        desc7.putInteger( idLght, 100 );
        var idClrR = charIDToTypeID( "ClrR" );
        desc7.putInteger( idClrR, 100 );
        var idFade = charIDToTypeID( "Fade" );
        desc7.putInteger( idFade, 0 );
        var idfsel = charIDToTypeID( "fsel" );
        desc7.putBoolean( idfsel, true );
        var idSrce = charIDToTypeID( "Srce" );
            var ref5 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idBckg = charIDToTypeID( "Bckg" );
            ref5.putProperty( idLyr, idBckg );
            var idDcmn = charIDToTypeID( "Dcmn" );
            ref5.putName( idDcmn, "4167_13828.jpg" );
        desc7.putReference( idSrce, ref5 );
    executeAction( idmatchColor, desc7, DialogModes.NO );

  • Resizing working window in photoshop ?

    How do you resize working space window in photoshop. As the lower section is off the bottom  of my screen?

    Which version of photoshop and operating system are you using?
    If your on a mac, click on the Green Maximize button

  • Resizing images saved in photoshop

    I'm working as a designer. Whenever I send images to my boss (usually jpgs saved in photoshop), she can't resize them. Is there a certain way I need to save them in order for them to be resized later?

    Microsoft Office picture manager. I opened a few of the problem images on my computer and I could resize them using the same program. Maybe something is happening during the email upload?

  • Why does Flash resize images coppied from Photoshop?

    Hi Everyone,
    I have images in photoshop that are exactly 700 X 298 pixels.
    However, when I copy and paste them into Flash, Flash actually
    changes the dimmensions to 700.1 X 297.6.
    I don't understand. I have all my Flash compression set to
    100% and best, 32 Bit, etc. Do you know why this happening?
    Thanks :)
    John Bruso
    Web Designer
    Sheridan College

    copy and paste is never the best option between programs -
    try File > Import. What's the dpi?
    Chris Georgenes
    Animator
    http://www.mudbubble.com
    http://www.keyframer.com
    Adobe Community Expert
    *\^^/*
    (OO)
    <---->
    jbrusosheridan wrote:
    > Hi Everyone,
    >
    > I have images in photoshop that are exactly 700 X 298
    pixels. However, when I
    > copy and paste them into Flash, Flash actually changes
    the dimmensions to 700.1
    > X 297.6.
    >
    > I don't understand. I have all my Flash compression set
    to 100% and best, 32
    > Bit, etc. Do you know why this happening?
    >
    > Thanks :)
    >
    > John Bruso
    > Web Designer
    > Sheridan College
    >
    >

  • How can I minimize all image windows within photoshop?

    Hi all,
    First post on the forum. I'm using CS3 on win XP.
    I'm creating a massive montage of over 60 images, I want to import the lot & minimise them all.
    60 individual mimimizes are a pain.
    Can I minimise them all ?
    Thanks
    Daryl

    "put them in a folder and point the processor at that folder."
    OR
    COPY them TO a folder and point the processor at that folder.

  • Open page in popup window using javascript:popupURL

    Hi, call a page in a popup window works fine using javascript:popupURL, but my question is
    Is it possible to specify height, width, pos x and y for the popup window?
    Thx in advance,

    Derlis,
    sure, but I guess you will have to write your own javascript function to do so:
    <script type="text/javascript">
    function myPopupURL(url)
      w = open(url,"winLov","Scrollbars=1,left=0,top=0,resizable=1,left=0,top=0,width=500,height=200");
      if (w.opener == null) w.opener = self;
      w.focus();
    </script>
    &lt;A href=&quot;javascript:myPopupURL('http://otn.oracle.com')&quot;&gt;OTN&lt;/A&gt;Best you put the javascript into the page header or page template header.
    You could even pass the parameters with each call to the javascript function as parameters.
    ~Dietmar.

  • Can't resize image to 16x20

    I'm trying to resize a RAW image to a 16x20.  I unchecked "resample image" and have "Constrain Styles" and "Scale Proportions" on in the Resize Image window.  I typed in 20 for the height and the width automatically filled in as 13.278.  I tried filling in the width as 16 and the height automatically filled in to 24.04.  I need to get this image resized to 16x20 and I can't figure out what I'm doing wrong! 
    Extra Info:  I have the "resample image" box unchecked because this image is going to be a canvas.  I'm new to the whole resizing images, canvases thing, so any help would be greatly appreciated!  I need to get this done today.
    I have Adobe Photoshop Elements 8.
    Any help would be GREATLY appreciated!

    I've got the same problem and don't know how to solve it !
    Did anybody already write something about that ?
    Could we get some source codes or links ?
    Thank's a lot
    Nicolas

  • How do webpage developers get Firefox to use the windows.resize or windows.moveTo javascript functions that seem to now be passed over?

    Before V7, this code worked and did as requested every time the page was run. Now, it does not work and no error is reported. Google Chrome and Internet Explorer are able to produce th correct result.
    <script type="text/javascript">
    window.resizeTo(325,700);
    window.moveTo(1150,10);
    </script>
    I have a site where I use window.open to create a login window with minimum chrome.
    On successful login, the window that created the login window updates itself to another page. The login window is supposed to resize itself and move to create a console panel to the right of the screen.
    I have tried to update the window from its parent at the point of successful login (flagged by a database change, checked frequently). I have also included code in the new window itself to resize itself to no avail.
    The new code seems to be failing on both the conditions laid out!

    Some conditions were added in 7.0 to avoid abuse of the resize and move functions:
    #Can't resize a window/tab that hasn't been created by window.open.
    #Can't resize a tab if the tab is in a window with more than one tab.
    * https://bugzilla.mozilla.org/show_bug.cgi?id=565541#c24
    There's still some discussion on the bug - including some solutions and troubleshooting for pages that were affected that shouldn't be - and it's being tracked to make sure it doesn't have any adverse effects.

  • Using javascript to resize the window

    I've got a project that I would like to resize depending on which slide the learner is viewing.
    I' aware that the javascript method:
    window.resizeTo(width,height)
    can be used to resize a window.
    In my case I want it to be for the tall window:
    window.resizeTo(1016,650)
    and for the short window;
    window.resizeTo(1016,165)
    I'm also aware that you can tell a button (or anything else) to execute javascript.
    I'm having trouble making it work, tough.
    I've tried putting the method directly into the Script_Window for the button.
    I've tried writing a function in the published file, then having the button call that function.
    Can you paste javascript snippets into the Script_Window? Or do you need go the whole 9 yards and write the entire function, name the button instance, and tell the Captivate button to call that function?
    I'm just now sure how much Captivate knows how to do and how much I need to tell it.
    Thanks in advance!
    Joe           

    Thanks for your response, Jim.
    My window was created by a previous window using the code:
    <script language="JavaScript">
    function newWindow() {
    TheNewWin = window.open("main.htm","newWin","status=no,resizable=yes,left=0,top=0,width=1014,height=6 50");
    TheNewWin.focus()
    </script>
    I tried the code above in the ScriptWindow of a Captivate button (running in a Captivate SWF in the new window). It didn't work.
    I also tried:
    TheNewWin.resizeTo(1016,165);
    and
    newWin.resizeTo(1016,165);
    neither of which worked.
    Any other guidance would be appreciated.

  • It's possible to use images from adobe photoshop elements in a windows environment?

    Sorry I am using a macbook pro.

    In short yes.
    Are you looking to open standard files on your Mac such as jpeg, tiff, PSD etc or are you looking to convert an earlier Windows catalog for use with elements Organizer on Mac OSX?

  • Resizing Images with Photoshop programatically (SDK) ?

    Hello,
    We have more 100,000+ master images that must be resized down programatically (over a nightly batch job).  We are losing photoquality when resizing these images (JPEGs).  However, when I resize these images in Photoshop, it produces very high quality images.
    This needs to be done programatically, is there an option to buy an SDK from Adobe where we can programatically resize these images on the fly?
    Basically, we need to use the same mechanism that photoshop uses to resize images, because it does a wonderful job of preserving the image quality, but we need programatic  access to it.
    Thanks,
    Raman

    The SDK is free, and downloadable by anyone.
    But it sounds like all you need is an action and the batch command, or a javascript -- which don't require the SDK.
    But these are not libraries - they use the Photoshop application.
    There are no libraries to do what Photoshop does.

  • Photoshop CS2 redraw garbage when moving around an image window on my G4 laptop

    Hi.I recently had to reinstall Photoshop CS2 onto my Mac Laptop 1.5 GHz PowerPC G4, running system 10.4.11, which required a new hard drive after the old one died. I am immediatly encountering a serious redraw/image repositioning problem in Photoshop that I have never seen before, and in Imageready as well. This does not happen in Macromedia Fireworks 8 however.
    I am zoomed into an image. Using the hand tool, or the scroll bars or the arrows, as soon as I move an image little messed up line graphic glitches appear and stay in place for the remainder or working with an image, and ultimately covers the image completely after moving around within it a number of times. you can see examples of this in these screenshots I've uploaded:
    http://pixeljam.com/temp/photoshopRedrawGarbage/moveGarbage04.gif
    http://pixeljam.com/temp/photoshopRedrawGarbage/moveGarbage03.gif
    http://pixeljam.com/temp/photoshopRedrawGarbage/moveGarbage02.gif
    and the lines stay the same size and position even when zooming in. here's the same image w/ the same defects zoomed out and in:
    http://pixeljam.com/temp/photoshopRedrawGarbage/moveGarbage01.gif
    http://pixeljam.com/temp/photoshopRedrawGarbage/moveGarbage01_zoomed.gif
    I've tried trashing & re-installing photoshop completely, tried running it before the updates needed from the original Photoshop application disk, and after. still the same problem.
    This occurs only when using the laptop on its own. When I hook it up to my Apple Studio Cinema Display, it works fine. The problem does not occur on the Cinema Display OR the laptop screen! it's very odd. Basically, the laptop is now something I cannot actually use away from my desk until this is resolved.
    Has anyone ever encountered this or possibly have any suggestions or advice? Thanks so much!
    -Rich
    And here are some more specs on my computer & hardware:
    Hardware Overview:
    Machine Name: PowerBook G4 12"
    Machine Model: PowerBook6,8
    CPU Type: PowerPC G4 (1.5)
    Number Of CPUs: 1
    CPU Speed: 1.5 GHz
    L2 Cache (per CPU): 512 KB
    Memory: 1.25 GB
    Bus Speed: 167 MHz
    Boot ROM Version: 4.9.0f0
    Serial Number: 4H5456AZRJ7
    Sudden Motion Sensor:
    State: Enabled
    Version: 1.0
    GeForce FX Go5200:
    Chipset Model: GeForce FX Go5200
    Type: Display
    Bus: AGP
    VRAM (Total): 64 MB
    Vendor: nVIDIA (0x10de)
    Device ID: 0x0329
    Revision ID: 0x00b1
    ROM Revision: 2122
    Displays:
    Color LCD:
    Display Type: LCD
    Resolution: 1024 x 768
    Depth: 16-bit Color
    Built-In: Yes
    Core Image: Supported
    Mirror: Off
    Online: Yes
    Quartz Extreme: Supported
    Cinema Display:
    Display Type: LCD
    Resolution: 1680 x 1050
    Depth: 32-bit Color
    Core Image: Supported
    Main Display: Yes
    Mirror: Off
    Online: Yes
    Quartz Extreme: Supported
    DIMM0/BUILT-IN:
    Size: 256 MB
    Type: Built-in
    Speed: Built-in
    Status: OK
    ATA Bus:
    MATSHITADVD-R UJ-845E:
    Capacity: 1.72 GB
    Model: MATSHITADVD-R UJ-845E
    Revision: DMP2
    Serial Number:
    Removable Media: Yes
    Detachable Drive: No
    BSD Name: disk5
    Protocol: ATAPI
    Unit Number: 0
    Socket Type: Internal
    OS9 Drivers: No
    S.M.A.R.T. status: Not Supported

    Hi. Thanks for your responses. There is definitely some incorrectness in the info I provided about the computer. for the Hard Drive, it's odd.. I copied and pasted that from my system profiler.. In actuality the Hard Drive is 74.53 GB. Not sure how that error occurred.
    Also I looked again at the computer's memory. I forgot the second larger 1GB memory card when I was copying and pasting from the system profiler. Sorry about that. I was in a but of a rush to get the question out.
    DIMM0/BUILT-IN:
    Size: 256 MB
    Type: Built-in
    Speed: Built-in
    Status: OK
    DIMM1/J31:
    Size: 1 GB
    Type: DDR SDRAM
    Speed: PC2700U-25330
    Status: OK
    Another thing I noticed about the problem I'm facing is that it leaves defects from mouse trails as well in the image window. None of the defects are lasting nor will they print. I close the file and they go away, if I zoom, they stay the same size. I'd agree, it sounds like a video card problem, but the reason I posted here is that only in photoshop and imageready do these problems occur. My guess, if it's the video card is that they are just programs that require more of the system. why my video card would be crapping out now, I have no idea. but I guess that's how it goes.
    But why would it work fine when hooked up to the apple cinema display? even on the laptop screen itself the problem is not present. only when the laptop is on its own.
    The computer has served me very well for almost 3 years without this problem, so that's why it's something that is not a normal problem that should be expected from this computer. I am grateful to have it & can't afford a new one.. this one is still sitting on my credit card balance. Thankfully I am under the applecare protection plan and will bring it in to the local Mac shop on monday and demonstrate the issue to them.
    Thanks for your replies.

Maybe you are looking for

  • Recording to a vcr

    I have a toshiba sd 392 combo vcr/dvd player on the tv WITHOUT the multi-room dvr and I can't record any progams to the vcr. Should I be able to record one show while watching another? I have the vcr/dvd player set to channel 3 and i can program my s

  • Reverse Back delete status in Purchase Order

    Hi I'm having problem when do the reversing for item in purchase order. ie Purchase Order : 123456 Item 10    Part A  already GR Item 20    Part B  already GR Item 30    Part C   User wrongly click Delete. in this case this PO will be close because 2

  • Convert yyyymmdd date format to mm/dd/yyyy

    hi, I convert the date fomat in my program from yyyymmdd to dd/mm/yyyy format using this code: WRITE it_pos-bldat TO i_outpos-bldat MM/DD/YYYY. I declared the bldat field by: bldat(10) TYPE c so that the field will contain the '/' character. The outp

  • When error says "See the inner exception for more details."

    Errors in Power Query say "See the inner exception for more details."  How does one do this? Thanks.

  • Nokia 5800 keeps connecting to WiFi every day.....

    I do not know y my nokia 5800 keeps connecting to wifi every day...few times a day... i have to manually disconnect the wifi but it will connect again later on.... i think it could be a virus or bug  when i already set to manual connection for the se