-
-
Save christophercotton/7753063 to your computer and use it in GitHub Desktop.
Modified the gist to allow it to work with the front most document.
This file contains 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(image, doc, layer) { | |
var sizes = [29, 40, 50, 57, 58, 72, 76, 80, 100, 114, 120, 144, 152, 1024]; | |
for (var idx = 0; idx < sizes.length; idx++) { | |
doc.scaleImageToWidth(sizes[idx]); | |
doc.dataRepresentationOfType("public.png").writeToFile("/Users/cotton/Desktop/icon-" + sizes[idx] + ".png"); | |
doc.undo(); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment