2 Replies Latest reply on Sep 16, 2008 5:38 AM by Bertus Bolknak

    Image Events

    Bertus Bolknak
      Platform: MacOS X.5.4
      Scriptlanguage: Applescript with ScriptDebugger.
      Application to script: Sorry, no InDesign but: Image Events


      I wrote an Applescript that tells the application "Image Events" to create thumbnails from selected jpg and/or pdf files.

      Here's a fragment of my script:
      tell application "Image Events"
      set the_copiedFile to open nameoftheThumbnailfile

      -- resize file to max 175 pixels.
      scale the_copiedFile to size 175

      -- set canvas size to 175 x 175 pixels.
      pad the_copiedFile to dimensions {175, 175} --with pad color {255, 255, 255}
      save the_copiedFile as JPEG in whereToSave
      close the_copiedFile
      end tell

      In the above example the result pad color will be black. But I want the pad color to be white, so I added a small piece of script: with pad color {255, 255, 255}, which is commented in the above fragment. When I uncomment it, then the script should work properly, according to the dictionary of Image Events, but unfortunately it doesn't. I get no Applescript error, but instead of a nice white background color, the file isn't padded at all. It even isn't scaled to 175 pixels!!! Strange but true.

      Anybody any idea? The code is properly compiled, so I guess I have a bug here?

      Kind regards, Bertus Bolknak