Copy link to clipboard
Copied
Hi!
It is possible to set image size, for example, to 1200 X 1200 pixels, when exporting for web using script?
function exportoptions(){
//jpg options
var jpgoptions = new ExportOptionsSaveForWeb();
jpgoptions.interlaced = false;
jpgoptions.quality = 50;
jpgoptions.includeProfile = false;
jpgoptions.format = SaveDocumentType.JPEG; // Document Type
doc.exportDocument(File(dest),ExportType.SAVEFORWEB,jpgoptions);
}
Yes, it is, but not using the standard DOM code:
https://theiviaxx.github.io/photoshop-docs/Photoshop/ExportOptionsSaveForWeb.html
You can either resize before export and close the original without saving... Or you can use the ScriptingListener plugin to record AM code for the export – including the resize (note the resize is recorded as a % value, not a px value).
Copy link to clipboard
Copied
Yes, it is, but not using the standard DOM code:
https://theiviaxx.github.io/photoshop-docs/Photoshop/ExportOptionsSaveForWeb.html
You can either resize before export and close the original without saving... Or you can use the ScriptingListener plugin to record AM code for the export – including the resize (note the resize is recorded as a % value, not a px value).
Copy link to clipboard
Copied
Resizing doc to 1200 pt before save for web works fine, thank you!
Copy link to clipboard
Copied
You're welcome (I'll mark it as the correct answer for you).