Batch PNG Convert
21/07/2011mkdir pngs; sips -s format png *.* --out pngs Einfach in einem Verzeichnis mit z.B. eine Menge PSD-Dateien ausführen und man bekommt recht schnell eine PNG-Version dieser Dateien.mkdir pngs; sips -s format png *.* --out pngs Einfach in einem Verzeichnis mit z.B. eine Menge PSD-Dateien ausführen und man bekommt recht schnell eine PNG-Version dieser Dateien.sips -s format pdf -s dpiHeight 72 -s dpiWidth 72 -s formatOptions low /path/to/pdf.pdf --out /path/to/converted/pdf.pdfSo ist z.B. auch eine deutlich schlankere Version von diesem Skripte (Bilder klein rechnen mit AppleScript) möglich:on open some_items
tell me to activate
display dialog "Längste Seite" default answer "1024"
set mh to (text returned of the result) as integer
repeat with this_item in some_items
rescale_and_save(this_item, mh)
end repeat
end open
to rescale_and_save(this_item, max_length)
set this_item to quoted form of (POSIX path of this_item)
set scaled_dir_path to (do shell script "dirname " & this_item) & "/_scaled/"
do shell script "mkdir -p '" & scaled_dir_path & "';sips -Z " & max_length & " " & this_item & " --out '" & scaled_dir_path & quoted form of (do shell script "basename " & this_item) & "'"
end rescale_and_save
Das Skript befindet sich zwar noch in der Entwicklung, aber ...mal sehen, was noch kommt =)