In view of my (yet) lacking scripting skills, I’d like to ask the help of you seasoned DTPO’ers!
I’m working on a technical report with a heap of digital photos. As you all know the size of nowadays photos doesn’t make it easier on our tools…
Therefore I’ve come up with the idea of using the image scaling scripts to help out.
I’ve adapted the script as follows:
-- Scale to 200 pixels
-- Created by Christian Grunenberg on Tue Apr 27 2004.
-- Adapted by PanE on Tue Nov 22 2016
-- Copyright (c) 2004-2014. All rights reserved.
-- Based on (c) 2003 Apple, Inc.
tell application id "DNtp"
try
set this_selection to the selection
if this_selection is {} then error "Please select some images."
repeat with this_item in this_selection
if the type of this_item is equal to picture then
try
set this_image to the image of this_item
with timeout of 30 seconds
tell application "Image Events"
launch
set this_file to open file this_image
scale this_file to size 200
save this_file without icon
close this_file
end tell
end timeout
synchronize record this_item
end try
end if
end repeat
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
end try
end tell
Now what I would like to achieve is:
- instead of scaling the original, I’d like to scale a copy.
- append _scale to the name so it becomes > picture_200.jpg
The idea being that all images from the same source will be listed together, and it will be easy to pic the correct size for the purpose.
Thanks for helping out!