2 Replies Latest reply on May 24, 2009 1:58 AM by Jukka Lauhalahti

    [AS][SC3] Image frame fitting

    Jukka Lauhalahti Level 1

      Hi!

       

      Problem:

      Hunderds of BMP-grayscale images in a document. Every image needs to be filled proportionally in frame. Also several tiff BW-images that should not be touched.

       

       

      Help needed...

       

       

      TIA!

       

       

      jukka

        • 1. Re: [AS][SC3] Image frame fitting
          Kasyan Servetsky Level 5

          tell application "Adobe InDesign CS3"
              set myDoc to active document
              set myLinks to links in myDoc
              repeat with n from (count myLinks) to 1 by -1
                  set myLink to item n of myLinks
                  set myImage to parent of myLink
                  if link type of myLink is "Windows Bitmap" then
                      if space of myImage is "Grayscale" then
                          fit myImage given proportionally
                      end if
                  end if
              end repeat
          end tell

          • 2. Re: [AS][SC3] Image frame fitting
            Jukka Lauhalahti Level 1

            Hi Kasyan!

             

             

            Thanks for your code, works perfectly.

             

            I had problems with this parent thing (parent of myLink), i seem to allways reference actual link and not parent...

             

             

            Thanks again!

             

             

             

            jukka