Guest User

Automator: Komprese obrázků přes AppleScript

a guest
Dec 6th, 2021
591
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on run {input, parameters}
  2.     set output to {}
  3.     repeat with aPath in input
  4.         tell application "Image Events"
  5.             set aPicture to open aPath
  6.             try
  7.                 scale aPicture by factor 1
  8.                 set end of output to save aPicture as JPEG with compression level low
  9.             on error errorMessage
  10.                 log errorMessage
  11.             end try
  12.             close aPicture
  13.         end tell
  14.     end repeat
  15.     return output -- next action processes edited files.
  16. end run
Advertisement
Add Comment
Please, Sign In to add comment