Saving to RGBA file extention
Posted: Sun Oct 06, 2019 3:43 am
Hi, Im trying to create a photoshop (jv) script that would save a .rgba (SGI RGB) extension when I save my photoshop file. I manage to modify a script to save out a SGI file. It just won't change the file extension to .rgba
Please Help.
main();
function main(){
var Name = app.activeDocument.name.replace(/\.[^\.]+$/, '');
var Ext = decodeURI(app.activeDocument.name).replace(/^.*\./,'');
if(Ext.toLowerCase() != 'psd') return;
var Path = app.activeDocument.path;
var saveFile = File(Path + "/" + Name +".rgba");
if(saveFile.exists) saveFile.remove();
SaveSGIRGB(saveFile);
}
function SaveSGIRGB(saveFile){
rgbaSaveOptions = new SGIRGBSaveOptions();
activeDocument.saveAs(saveFile, rgbaSaveOptions, true, Extension.LOWERCASE);
}
Please Help.
main();
function main(){
var Name = app.activeDocument.name.replace(/\.[^\.]+$/, '');
var Ext = decodeURI(app.activeDocument.name).replace(/^.*\./,'');
if(Ext.toLowerCase() != 'psd') return;
var Path = app.activeDocument.path;
var saveFile = File(Path + "/" + Name +".rgba");
if(saveFile.exists) saveFile.remove();
SaveSGIRGB(saveFile);
}
function SaveSGIRGB(saveFile){
rgbaSaveOptions = new SGIRGBSaveOptions();
activeDocument.saveAs(saveFile, rgbaSaveOptions, true, Extension.LOWERCASE);
}