Liebe Experten,
ich habe ein Skript geschrieben, um u.a. die Bildgröße automatisch zu ändern. Ich brauche als Ergebnis ein Bild mit 480 pixel Höhe in 72 dpi Auflösung. Bei meinem Skript (s.u.) bekomme ich zwar genau das, leider rechnet es mir das Bild zuerst in 72 dpi runter und dann - zumindest bei kleineren Bildern - auf 480 pixel hoch. Dadurch leidet natürlich die Bildqualität. Wie sage ich im Skript, dass das Bild zuerst auf 72 dpi OHNE Neuberechnung geändert wird und dann auf 480 pixel Höhe MIT Neuberechnung?
Gruß
Kluftinger
set Ordner to (choose folder with prompt "Wählen Sie einen Ursprungsordner") as string
set WohinPBS to choose folder with prompt "Wählen Sie einen Zielordner für die PBSeasy Daten"
set destPathlow to WohinPBS as string
tell application "System Events"
set these_files to every file of folder Ordner
end tell
repeat with i from 1 to the count of these_files
set this_file to (item i of these_files as alias)
tell application "Finder" to set fileName to name of this_file
if (count of text items of fileName) is greater than 1 then
set AppleScript's text item delimiters to "."
-- nimmt den "." als trenner des dateinamens
set fileName to text items 1 thru -2 of fileName
end if
set newFilePath to destPathlow & fileName & "_PBS.jpg"
set this_info to info for this_file
if visible of this_info is true and alias of this_info is false then
tell application "Adobe Photoshop CS4"
launch
activate
try
open this_file showing dialogs never
end try
set meinBild to the current document
try
change mode meinBild to RGB
resize image meinBild resolution 72 resample method bicubic
resize image meinBild height pixels 480 resample method bicubic
-- vielleicht auch: height: pixels 480
end try
set myOptions to ¬
{class:JPEG save options, embed color profile:true, format options:progressive, quality:6, scans:3} ¬
try
save current document in file newFilePath as JPEG with options ¬
myOptions appending no extension without copying
end try
close current document
end tell
end if
end repeat