Если вы новичок здесь, вы можете подписаться на мой RSS-фид. Будьте в курсе всех обновлений.
Откройте Script Editor, создайте новый скрипт, вставьте в него нижеследующий код, сохраните как приложение. Перетащите на него картинку, укажите в какую сторону нужно повернуть изображение и рядом с исходной картинкой появится файл с перевёрнутой.
Offtopic: Маул организовал конкурс, где каждый может показать свой блог тысячам читателей.
-- Slight rehashing of this tutorial: http://www.macosxhints.com/article.php?story=2004092804461334
-- Thanks for the kickstart "robg."
global theAngle
on open some_items
display dialog "Rotate...?" buttons {"Left", "Right", "180"} default button 3
set the button_pressed to the button returned of the result
if the button_pressed is "Left" then
set theAngle to 270
else if the button_pressed is "Right" then
set theAngle to 90
else if the button_pressed is "180" then
set theAngle to 180
end if
repeat with this_item in some_items
try
rotate_and_save(this_item, theAngle, button_pressed)
end try
end repeat
end open
to rotate_and_save(this_item, theAngle, button_pressed)
tell application "Image Events"
launch
-- open the image file
set this_image to open this_item
set typ to this_image's file type
rotate this_image to angle theAngle
-- Feel free to change the "90" to however many degrees you want to rotate
end tell
tell application "Finder" to set new_item to ¬
(container of this_item as string) & "rotated_" & button_pressed & "_" & (name of this_item)
save this_image in new_item as typ
end rotate_and_save


Комментариев нет ↓
Пока не оставлено ни одного комментария.
Комментировать