Created
August 13, 2012 21:09
-
-
Save natevw/3344123 to your computer and use it in GitHub Desktop.
Resize images in Acorn's "Do Javascript" Automator action
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main(input) { | |
for (var i = 0, len = input.length(); i < len; i += 1) { | |
var path = input[i]; | |
var doc = Acorn.open(path); | |
doc.scaleImageToWidth(300); | |
doc.saveDocument(null); // NOTE: this *does* drop EXIF orientation, unlike Preview's resize action | |
doc.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment