Automatic saving of images in Photoshop using the Photoshop scripting language

54 Views Asked by At

I am trying to save images in the AV1 Image (.AVIF) format using a script. My version of Photoshop (20.0.5) does not support this file format, but I added this feature to the version via a plugin located at https://github.com/0xC0000054/avif-format/releases. I am able to access the feature by navigating to File>Save As>Save as type:> AV1 Image (.AVIF). However, when I attempt to save using the following code, I receive the error message: "Error 8800: General photoshop error occurred. This functionality may not be available in this version of Photoshop."

      // Save the image as an AVIF file
    var saveFile = new File(saveFolder + '/Image' + i + '.avif');
    var avifOptions = new ActionDescriptor();
    avifOptions.putPath(charIDToTypeID('In  '), saveFile);
    avifOptions.putEnumerated(charIDToTypeID('As  '), charIDToTypeID('FTcs'), charIDToTypeID('AVIF'));
    executeAction(charIDToTypeID('save'), avifOptions, DialogModes.NO);

Does anyone know how to resolve this error and successfully save images in the AV1 Image (.AVIF) format using this script?

0

There are 0 best solutions below