Created
June 26, 2018 03:52
-
-
Save NimaiMalle/e63d9535df29f78170d78d6635c01e3d to your computer and use it in GitHub Desktop.
Save without dialog prompts in Photoshop
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
jpgSaveOptions = new JPEGSaveOptions(); | |
jpgSaveOptions.embedColorProfile = true; | |
jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE; | |
jpgSaveOptions.matte = MatteType.NONE; | |
jpgSaveOptions.quality = 11; | |
var Name = decodeURI(activeDocument.name).replace(/\.[^\.]+$/, ''); | |
var Path = decodeURI(activeDocument.path); | |
var saveFile = File(Path + "/" + Name + ".jpg") | |
activeDocument.saveAs(saveFile, jpgSaveOptions, true, Extension.LOWERCASE); |
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
opts = new PNGSaveOptions(); | |
opts.compression = 9; | |
opts.transparency = true; | |
opts.interlaced = false; | |
var Name = decodeURI(activeDocument.name).replace(/\.[^\.]+$/, ''); | |
var Path = decodeURI(activeDocument.path); | |
var saveFile = File(Path + "/" + Name + ".png"); | |
activeDocument.changeMode(ChangeMode.RGB); | |
activeDocument.saveAs(saveFile, opts, true, Extension.LOWERCASE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment