Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (14 sloc) 449 Bytes
// This goes in the JSTalk Automator Action
function run(input, parameters) {
var acorn = [JSTalk application:"Acorn"];
var idx = 0;
while (idx < input.length()) {
var filePath = input[idx];
var doc = [acorn open: filePath];
[doc scaleImageToHeight:200];
[[doc dataRepresentationOfType:"public.png"] writeToFile: filePath + ".png"];
[doc close];
idx++;
}
return input;
}
Something went wrong with that request. Please try again.