Ausgabe
Ich möchte ein Skript schreiben, das anderen Text aus einer Textdatei in meinem Shalon ersetzt und das Bild im JPEG-Format speichert.
Ein Fehler tritt auf: „Diese Funktion ist möglicherweise in dieser Version von Photoshop nicht verfügbar“ in dieser Zeile:
activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);
Mein Code:
while(!myFile.eof)
{
line = myFile.readln();
createText(line);
var thistimestamp = Math.round(new Date().getTime() / 1000);
saveFile = new File( "/c/Users/marki/Desktop/Temp001/" +thistimestamp)
saveOptions = new JPEGSaveOptions();
saveOptions.embedColorProfile = true;
saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
saveOptions.matte = MatteType.NONE;
saveOptions.quality = 9;
app.activeDocument.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);
}
Ich verwende Adobe Photoshop: 2017.0.0 20161012.r.53 2016/10/12:23:00:00 CL 1094006 (x64)
Lösung
Du hast die Erweiterung verpasst 😀
saveFile = new File( "c:\\temp\\" + thistimestamp) + ".jpg");
Beantwortet von – Ghoul Fool
Antwort geprüft von – Willingham (FixError Volunteer)