Hey guys thanks for the responses! @JJMack: Yes I do have the plugins installed @Javier: Sure the code is below, I cut a few things out to remove anything that might be considered work sensitive so if a piece doesn't make sense that's probably why. Again if the save settings are switched to TIFF it works correctly. #target photoshop var AD = activeDocument; var docPath = AD.path; var docName = AD.name; var savePath = new Folder (docPath.parent); var saveName = docName.substring(0 , docName.length - 4); //Layers that should be saved out var layerNight = AD.artLayers.getByName("NIGHT"); var layerColor = AD.artLayers.getByName("COLOR"); //This is the savepath and name the file will be saved under nightFile = new File(savePath + "/" + saveName + "_night.rgb") colorFile = new File(savePath + "/" + saveName + "\.rgb") //Find the document's height for resizing var docHeight = AD.height; var docWidth = AD.width; var savedState = AD.activeHistoryState; //FILE OPTIONS //SGIRGB Save Options saveOptions = new SGIRGBSaveOptions() saveOptions.spotColors = false saveOptions.alphaChannels = true saveOptions.typename = false saveNight () saveColor () //Function for saving the Night Data function saveNight (){ //Toggles required layer on and other off to make sure NIGHT is top layer layerNight.visible = true layerColor.visible = false resizeDocument() saveOptions.alphaChannels = false app.activeDocument.saveAs(nightFile, saveOptions, true,Extension.LOWERCASE) revertHistory () } //Function for saving the Color Data function saveColor (){ //Toggles required layer on and other off to make sure COLOR is top layer layerNight.visible = false layerColor.visible = true saveOptions.alphaChannels = false app.activeDocument.saveAs(colorFile, saveOptions, true,Extension.LOWERCASE) } function resizeDocument(){ //app.activeDocument.suspendHistory ("History Revert", "saveColor()") app.activeDocument.resizeImage((docWidth/2), (docHeight/2), null, ResampleMethod.NEARESTNEIGHBOR) } function revertHistory (){ //'AD.historyState.getByName ("History Revert"); AD.activeHistoryState = savedState; app.purge (PurgeTarget.HISTORYCACHES); }
... View more