Resize all images in document

Hello,
I have long document with 300+ images. I need to re size them all to W=63,5 mm and H=53 mm. I dig the Forum and find out this script from user "Harbs." but it is for re scaling images to certain percent:
This will scale all images to 90% of their current size:
  myGraphics = app.activeDocument.allGraphics;   for (idx = 0; myGraphics.length > idx; idx++) {    if(myGraphics[idx].constructor.name!="Image"){continue}    myGraphics[idx].parent.horizontalScale = 90;    myGraphics[idx].parent.verticalScale = 90;   }
And this will scale them to an absolute 90%:
  myGraphics = app.activeDocument.allGraphics;   for (idx = 0; myGraphics.length > idx; idx++) {    if(myGraphics[idx].constructor.name!="Image"){continue}    myGraphics[idx].horizontalScale = 90;    myGraphics[idx].verticalScale = 90;    myGraphics[idx].parent.fit(FitOptions.FRAME_TO_CONTENT);   }
Anyone knows how to make it to resize the images to specific size?
Thanks!

Setting width and height is a bit more complicated because you have to calculate the bounds (there isn't a width and height property for an image). I can't do it off the top of my head with javascript, but if you're using OSX this Applescript would resize from the upper left corner.
tell application "Adobe InDesign CC 2014"
    tell active document
        set properties of view preferences to {horizontal measurement units:millimeters, vertical measurement units:millimeters}
        repeat with x in all graphics
            set {a, b, c, d} to geometric bounds of x
            set geometric bounds of x to {a, b, a + 53, b + 63.5}
            tell parent of x
                fit given frame to content
            end tell
        end repeat
    end tell
end tell

Similar Messages

  • Why does ibooks author automatically resize all images of a gallery?

    The point here is, I have more than one graphic files (not pictures taken by a camera) to put into one gallery widget of an iBooks Author document. Unfortunately, not all figures have the same height/width aspect ratio. If I put them together in the gallery, some of them have cropped widths others have cropped heights. Impossible to losslessly fit all into the same gallery. If I scale alle figures to the same width, the result is acceptable for the figure with the highest heigth, all other figures are cropped again.
    Well in a first time, I was not that much concerned, but the iBooks Author Quality check refused to publish such eBooks, where some picutes appear cropped in the small view (not in the full-screen view).
    Now, why is the iBA software automatically sizing all images of a gallery w.r.t. the center of an image? It would be of much more help, to leave some white background boarders on images of un-equal height, as long as the width of all images is exactly the same. The crop-pan function would then be useful to individually place a smaller-than-the-rest image in that frame of its larger precedecor image.
    Can this autosize function be turned off? Am I really forced to paste smaller images into a white image of the maximum height/width of the galery's largest image?

    If you have differently shaped (height/width) images that you want to place in one gallery....
    The first image you place will determine the shape (max height and width) of your gallery mask, so choose it wisely.
    Before you add each image to the gallery go to photoshop and:
    1. Size the IMAGE to be at the max height OR width of your gallery mask -- do this if you want at least one dimension (height or width) to fit all the way across or up and down in the gallery mask.
    2. Size the CANVAS to the same height and width of your first image (the size of your gallery mask).
    I hope this makes sense and is helpful. Yes, it's ridiculous, but it's the only way I found to make images of different dimensions fit in a gallery.

  • Photoshop cc generate assets doesn't resize all images correctly

    I have a stack of images, and I'm using Photoshop CC's new generate assets to produce two versions of each. One at current size (retina), one at half size (normal). Each layer I'm exporting has this naming format "[email protected], 50%image1.jpg".
    When I generate assets, not all 50% scaled images get scaled down. Some that should be half the size are the same dimensions as the retina version. Other images scaled down by 50% are correctly resized. It seems to be random.
    I have tried variations of scaling, 25%, 200%, renaming the layers, turning generate assets off then on, re-opening the psd, restarting photoshop. None of these seems to make a difference.
    Anyone else experienced this, or have a solution?

    I have a stack of images, and I'm using Photoshop CC's new generate assets to produce two versions of each. One at current size (retina), one at half size (normal). Each layer I'm exporting has this naming format "[email protected], 50%image1.jpg".
    When I generate assets, not all 50% scaled images get scaled down. Some that should be half the size are the same dimensions as the retina version. Other images scaled down by 50% are correctly resized. It seems to be random.
    I have tried variations of scaling, 25%, 200%, renaming the layers, turning generate assets off then on, re-opening the psd, restarting photoshop. None of these seems to make a difference.
    Anyone else experienced this, or have a solution?

  • Theres an opportunity to RESIZE all linked images to 100% of the frame?

    Theres some third party plugins, but i dont find one which works well and support layered psd for example. i think its a basic function and it should have an native way to do that.
    thanks a lot.

    That's a very old school way of achieving things - namely Quark.
    In the past it was necessary to resize all images to 100% @ the desired resolution.
    InDesign gives 2 resolution views in the Window>Info panel for each image.
    Actuall PPI and Effective PPI
    Actual shows the actual amount of PPI - and Effective PPI shows the PPI of the image after scaling .
    When you export the file to PDF you can choose the Compression of the image to any DPI you would like.
    This means the same file can be used for
    Newspapers
    Brochures
    Magazines
    High-End print finishing
    Each of the above have a unique LPI - which determines the optimum resoultion.
    This way you don't end up with 4 different files for the same job.
    Or worse - 16 incarations of the same image at different sizes for different outputs.

  • Script to resize all tables in a document

    I'm using Framemaker 11, and have tons of tables that need to be resized so that they fit within the text frame. Does anyone know of a script or a fast way to resize all the tables in a document at once?

    TableCleaner does a bunch more than just resizing, and is one of the best values I've seen for a plugin.
    Looks like he's switching his content to a Wordpress site, so here's Rick's direct info:
    rick at frameexpert dot com
    [use link: http://www.frameexpert.com/old/]

  • Where does time machine store content that would be found in the Finder window under "All Images, All Movies, All Documents"? Also, I have many Garageband projects and mp3 files I can't find.

    Where does time machine store content that would be found in the Finder window under "All Images, All Movies, All Documents"? Also, I have many Garageband projects and mp3 files I can't find.

    Easiest way to find time machine files is to open up the folder or application(works for email and iphoto)  they were in - then click on time machine ICON or enter time machine from the time machine menu to go back through the files.

  • Resizing/compresing images within a document

    Hi
    I am trying to compress all images within a document I've just creacted, in order to avoid having a 20Mb size document, but I cannot find the tool anywhere. I am just new to Pages, transfered from Office Word, where this task can easily be done by write clicking and imag properties.
    Would someone be able to help me?
    Thanks

    Thanks dennis.
    Thats what I've been doing, exporting the images into mail and re-sizing them, then a drag and drop into the document. Seems rediculous though. We make reports so we have loads of documents, all around 50MB, it soon builds up.
    I'll leave feedback in pages I recon.
    Regards,
    Rob

  • Word document is all images

    After I convert pdf to word, the word document is all images and I cannot edit the text?

    Hi
    Can you try to OCR the document?
    This option "Recognize Scanned text in"is available in Export options dialog during conversion.
    Thanks
    -sarabjit

  • Bridge CC when copying resizes window to both monitors and enlarges all images to maximum size

    Bridge CC when copying an image resizes window to both monitors and enlarges all images to maximum size.

    Details, please.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers: 
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • What is the Search for:-  All images/All documents/all movies for in Finder

    I am confused as to the purpose of Search for:- All images/documents/movies in Finder. I seem to have documents, pictures and music I have never seen or downloaded, and often photos I have actually downloaded are copied in triplicate sometimes more. I have at times got 10,000 items in my documents in Search for? My worry really is does this all take up memory on my computer and if so why is it happening and how do I stop it?
    I do hope someone can explain the purpose of the Search For?
    Jai309

    Thanks Kappy, I had thought that is what it probably was but just confused by all the items I never searched for or downloaded. Now that I know it doesn't take up any memory I shan't worry about it. When I deleted everything from the search for files all the photos in my iphoto and documents were also removed. (thankfully I always have my stuff backed up on hard drive) I guess one just shouldn't remove them? Is there a safe way to clear it out without loosing the stuff I need to keep?
    Regards
    Jai309

  • Is it possible to find all images below 300dpi in a document?

    Hi there, I'm hoping this is a quick question. I've had a look on google but to no avail.
    Is it possible to find all images within an indesign document that are below 300dpi. I've got a lot of images placed in a document, quite a lot were low res (not all, but a lot) just for quickness to begin with...but now I need to replace them with the high res for print, and theres LOADS so i don't really wanna do it manually.
    I know when you do preflight indesign will tell you if there are any images using RGB colour space, but will it do somehting similar with image quality?
    Mac OSX 10.5.8, InDesign CS3

    Okay, here is a fast one but it seems to do the job.
    Copy the text in the frame below into a plain text document using Notepad, Textedit (in plain text mode!), or -- safest -- InDesign's own ESTK Editor that comes installed with the package. Save as "ReportBadResolution.jsx" in your User Scripts folder (see also InDesignSecret's How to install scripts in InDesign).  Double-click to run.
    If nothing happens, all images are okay. If you get an error somewhere, you have used images in a way I did not foresee (and thus didn't script how to handle these); try to report what goes wrong where and on what sort of image, if possible.
    If the script does find anything wrong -- it checks for a minimum resolution of 300 dpi and, as a bonus, on badly scaled images -- it will create a new blank document and fill a text frame with the relevant information: image name, page, and x/y resolutions. It creates only one single page so if you get an 'overset text plus' at the bottom you have lots and lots of bad images ...
    Here's the script to copy:
    //DESCRIPTION:Report Bad Resolutions for a New Year
    // No Guarantees, Ltd. Use at your own risk.
    // Jongware, 05-Feb-2010
    // Minimum dpi allowed:
    var minimumValue = 300;
    // Alert when x/y scaling is off by this much percents:
    var percentageScaling = 1;
    var lowResList = new Array;
    for (aGraphic=0; aGraphic<app.activeDocument.allGraphics.length; aGraphic++)
    oneGraphic = app.activeDocument.allGraphics[aGraphic];
    try {
      xres = oneGraphic.effectivePpi[0];
      yres = oneGraphic.effectivePpi[1];
      if (xres < minimumValue || yres < minimumValue)
       lowResList.push (oneGraphic);
      else
       if (xres < yres)
        scaling = 100*yres/xres;
       else
        scaling = 100*xres/yres;
       if (scaling > 100+percentageScaling)
        lowResList.push (oneGraphic);
    } catch (_) {}
    if (lowResList.length > 0)
    doc = app.documents.add();
    frame = doc.textFrames.add({geometricBounds:[0,0,doc.documentPreferences.pageHeight, doc.documentPreferences.pageWidth]});
    txt = '';
    for (i=0; i<lowResList.length; i++)
      pg = ultimateParent (lowResList[i]);
      txt = txt+"File: "+lowResList[i].itemLink.name;
      if (pg.parent instanceof(MasterSpread))
       txt = txt+' on Master spread '+pg.name;
      else
       if (pg instanceof(Spread))
        txt = txt+' on clipboard of pg '+pg.pages[0].name;
        for (j=1; j<pg.pages.length; j++)
         txt += '-'+pg.pages[j].name;
       } else
        txt = txt+' on pg '+pg.name;
      txt = txt+' has xres: '+lowResList[i].effectivePpi[0]+', yres: '+lowResList[i].effectivePpi[1]+'\n';
    frame.contents = txt;
    } else
    alert ("No images have a resolution less than "+minimumValue+" dpi");
    function ultimateParent(obj)
    while (1)
      obj = obj.parent;
      if (obj.constructor.name == "Page")
       break;
      if (obj.constructor.name == "Character")
       obj = obj.parentTextFrames[0];
      if (obj.constructor.name == "Spread" || obj.constructor.name == "MasterSpread")
       break;
    return obj;

  • E mail attachments that are deleted show up in all images or all documents; how can I prevent this form happening?

    e mail attachments that are deleted seem to still show up in the all images or all documents files; how do I keep this from happening?  If an attachment is deleted I don't want to continue to keep a copy anywhere.  Thanks.

    I know this is almost a year later but I have been searching for a solution to the same problem you had. How did you fix this issue? I can see that something pops up on this site right before a transition. Why does that happen and not show in the preview and how do you fix it? Any help is appreciated!

  • Using Javascript & Actions to resize an image and add the filename as text

    Hello,
    I am currently working on a way to take an image, resize it and add exactly what is in it's file name (before extension) as a text layer. I have succeded in this BUT am having issues with file names that require more than one line of text.
    I need the text to align to the bottom of the image & the script or action must then resize the image so that the text does not overlap.
    Any ideas on how this can be done?
    At the moment I am using:
    -"Fit Image.jsx" to resize my image to a specific size (This was included in the Photoshop CS5 scripts)
    - A script to add the file name without extension and place the file name at a specific position.
    AdFileName.jsx
    if ( documents.length > 0 )
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.PIXELS;
    try
      var docRef = activeDocument;
      // Now create a text layer at the front
      var myLayerRef = docRef.artLayers.add();
      myLayerRef.kind = LayerKind.TEXT;
      myLayerRef.name = "Filename";
      var myTextRef = myLayerRef.textItem;
      // strip the extension off
      var fileNameNoExtension = docRef.name;
      fileNameNoExtension = fileNameNoExtension.split( "." );
      if ( fileNameNoExtension.length > 1 ) {
       fileNameNoExtension.length--;
      fileNameNoExtension = fileNameNoExtension.join(".");
      myTextRef.contents = fileNameNoExtension;
      // off set the text to be in the middle
      myTextRef.position = new Array( docRef.width / 2, docRef.height / 2 );
      myTextRef.size = 12;
            myTextRef.font="Arial-BoldMT"
            //set position of text
            myTextRef.justification = Justification.CENTER;
            myTextRef.kind = TextType.PARAGRAPHTEXT;
            myTextRef.width= docRef.width;
            myTextRef.height= docRef.height/ 2;
            myTextRef.position= [0, docRef.height * 0.88];
    catch( e )
      // An error occurred. Restore ruler units, then propagate the error back
      // to the user
      preferences.rulerUnits = originalRulerUnits;
      throw e;
    // Everything went Ok. Restore ruler units
    preferences.rulerUnits = originalRulerUnits;
    else
    alert( "You must have a document open to add the filename!" );
    Can the position be changed to allow more rows of text but keep it aligned with the bottom of the layer?
    How can I script in a way to make the image resize based on the amount of text lines?
    Any help would be greatly appreciated.

    You can add a text layer any where the only thing you need to worry about is the size of the font you use.  You can normally calculate a font size by saving the images resoltuion and then setting its resolution to 72 DPI calculate a font size basied of the images pixel width and the number of characters you want in a line. After adding the text layer you can restore the image to its original resolution and align the text layer by making a selection and alignint the text layer to the selection.  There are nine posibilites like the positions in the selection you can align to like a tick tack toe board. You need to use a script to add the text layer because your retrieving the filename.  The positioning of the text layer could be done easily in an action the would use the scriot to add a text layer the do a select all  the align the added text layer to the selection.
    About your script don't make text paragraph just add new line characters to make a multi line text layer So it can be positioned easily
    I do just that with my stampexif action.  The action uses my stampexif Photoshop java script to add a multi line text layer containing some formatted EXIF data then the action centers the text layer and add a layer style to it. Link http://www.mouseprints.net/old/dpr/StampExif.jsx Example

  • Problem with photoshop automatically resizing placed images

    Hi,
    I have PS6. I have images that are 144x100 px. When I use file>place ps resizes the image to 108x75. I can't figure out how to make ps quit resizing my pictures. Anybody know?
    Thanks

    When Pasting, Dragging, copying and placing an image Photoshop will copy all of the image being duplicated original pixels to preserve the image pixel quality the image quality.  If the receiving document has a different DPI resolution the image may look a different size in the  receiving documents because of the number of pixels added to the document that has a lower or higher dpi resolution.  If the image is being placed in if the image pixels exceeds the receiving documents canvas size. Photoshop may scale the smart object layer to fit within the canvas that depends on the users Photoshop's preference.  All of the images original pixels are still there in the embedded object.   In my Photoshop Collage Scripts  I always transform all placed images to 100% size  incase Photoshop scaled the placed image.  For you can not get the scale percent Photoshop used.  Once I know I have the image at 100% size I can use the layer bounds to get the actual number of pixels there are in the placed image.  Once I know that I can calculate the scale I need to use to resize the image to fit the area being populated in the collage template.   Once resized I center it into place and mask off any excess image pixels.

  • Resize html image in email signature

    Hi, I have been trying to insert my company logo in my email signature on Outlook Client 2013 but the results have been disappointing. Would greatly appreciate your assistance. Thank you in advance!
    My company logo is in png-format. Its dimensions are 1221 x 374 px, and has a dpi of192. Its size is 37.9 KB. 
    I have read from various online sources that it is better to resize the image such that it is not larger than 10 KB.
    However, I do not want to resize the image (to ideal width: 150 px) before inserting it in the signature editor, because doing that is bound to degrade the resolution of the image, no matter how good the photo editor is. I have tried gimp and various
    photo editors, but the resulting picture quality is poor and grainy. I can barely make out the text in the logo. 
    These are the 4 methods that I have tried:
    1. I followed this YouTube tutorial. I insert the image in signature editor. The location of the image is at my Desktop. Save and close. 
    I insert the signature in a new email. The resulting image is large and appears according to its original dimensions in my signature. So I resize the image in the inserted email signature, copy that resized image, then paste it in the signature
    editor. The resized image will appear, with reduced dimensions. I save and close the signature editor.
    Then, I insert the signature again in the email. The dimensions of the image are correct and they appear perfect. So I do a test by sending an email to myself. When I view the email on Outlook Client, the image looks perfect. However, on Outlook
    Web App, the image is extremely large and out of place. I have been racking my brains on how to solve this problem.
    2. Same as step 1. But instead of inserting the logo from my Desktop, I inserted the logo located on the web by typing its URL in full. I used: Insert > Link to File.
    However, the same problem appears. The image in the send email looks great on Outlook Client, but too large on Outlook Web App.
    3. Re-render the image to 96 dpi using IrfanView. I read from this source that Outlook will rescale any image that is not 96 dpi.
    Tried Step 1 again. But image size in Outlook Web App is too large again.
    4. I followed the steps in this link to create a HTML email signature. I used an online WYSIWYG HTML editor
    to generate the HTML code. I realised that altering the height and width of the image in the html changes the size of the image only in the WYSIWYG editor. I believe that Outlook Client overrides all provided image dimensions.
    Thank you so much for your help!

    Hi Joy,
    Try this.
    Compose the signature in Outlook, insert the original image, resize it to the correct size, by dragging the image using mouse.
    Compress using inbuilt Outlook tool, this should not degrade the quality of the image much.
    Click the picture or pictures that you want to change the resolution for.
    Under Picture Tools, on the Format tab, in the
    Adjust group, click Compress Pictures.
    If you do not see the Picture Tools and Format tabs, make sure that you selected a picture. You may have to double-click the picture to select it and open the
    Format tab.
    To change the resolution for the selected pictures only and not all of the pictures in the document, select the
    Apply only to this picture check box.
    Under Target output, click the resolution that you want.
    Now, copy all and create a new Signature out of this.
    Send out an email with this new signature and see if it works on OWA.
    Ensure you are checking it on the same PC and the Web browser is on 100% zoom level.
    In my case its appearing slightly smaller on Browser then on PC. Check if its same on different PCs as well.
    Regards,
    Satyajit
    Please “Vote As Helpful”
    if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

Maybe you are looking for

  • Install of 8.1.6 SE Hangs

    The installer starts up, shows the splash screen, but the Next button doesn't work. Neither does Exit or Installed Products. Deinstall responds, but only to say that there is nothing installed. The Installer starts up a bunch of JRE processes using t

  • Creating tables on SQL studio and viewing the table in the SAP system

    i have just created a table using the SQL studio and wants to use it view it in the SAP system using the SAP logon. till now i have not found a way to create it therefore any help is much appreciated.

  • Error creating OIM Schema with RCU 11.1.1.5

    I am trying to create the OIM schema on Oracle 11g R2 using RCU 11.1.1.5. Both the database and RCU is being ran on Windows Server 2003 x64. The error I am getting is included. The remaining schemas are all created fine. 2011-06-21 14:58:58.321 NOTIF

  • Error in Java code

    i dont know if this is the right place to post this.. but... ehh when i try to compile these two programs i get errors This program is saved in Item.java and it compiles fine public class Item      private String name, desc;      private double price

  • Text box ignores spacing settings.

    Using the tooltip widget. Put a text box inside the trigger. Set left, right, and bottom spacing. Right spacing is ignored. Removed spacing and used left and right margin instead (in text settings), this worked fine. See attached images, showing how