ExportOptionsPNG24
ExportOptionsPNG24
Section titled “ExportOptionsPNG24”exportOptionsPNG24
Description
Section titled “Description”Options for exporting a document as a 24-bit PNG file, used with the Document.exportFile() method. All properties are optional.
When you export a document, the appropriate file extension is appended automatically. You should not include any file extension in the file specification.
Properties
Section titled “Properties”ExportOptionsPNG24.antiAliasing
Section titled “ExportOptionsPNG24.antiAliasing”exportOptionsPNG24.antiAliasing
Description
Section titled “Description”If true
, the exported image be anti-aliased.
Default: true
.
Boolean.
ExportOptionsPNG24.artBoardClipping
Section titled “ExportOptionsPNG24.artBoardClipping”exportOptionsPNG24.artBoardClipping
Description
Section titled “Description”If true
, the exported image be clipped to the art board.
Default: false
.
Boolean.
ExportOptionsPNG24.horizontalScale
Section titled “ExportOptionsPNG24.horizontalScale”exportOptionsPNG24.horizontalScale
Description
Section titled “Description”The horizontal scaling factor to apply to the exported image, where 100.0 is 100%.
Default: 100.0.
Number (double).
ExportOptionsPNG24.matte
Section titled “ExportOptionsPNG24.matte”exportOptionsPNG24.matte
Description
Section titled “Description”If true
, the art board be matted with a color.
Default: true
.
Boolean.
ExportOptionsPNG24.matteColor
Section titled “ExportOptionsPNG24.matteColor”exportOptionsPNG24.matteColor
Description
Section titled “Description”The color to use when matting the art board.
Default: white
.
ExportOptionsPNG24.saveAsHTML
Section titled “ExportOptionsPNG24.saveAsHTML”exportOptionsPNG24.saveAsHTML
Description
Section titled “Description”If true
, the exported image be saved with an accompanying HTML file.
Default: false
.
Boolean.
ExportOptionsPNG24.transparency
Section titled “ExportOptionsPNG24.transparency”exportOptionsPNG24.transparency
Description
Section titled “Description”If true
, the exported image use transparency.
Default: true
.
Boolean.
ExportOptionsPNG24.typename
Section titled “ExportOptionsPNG24.typename”exportOptionsPNG24.typename
Description
Section titled “Description”The class name of the referenced object.
String; read-only.
ExportOptionsPNG24.verticalScale
Section titled “ExportOptionsPNG24.verticalScale”exportOptionsPNG24.verticalScale
Description
Section titled “Description”The vertical scaling factor to apply to the exported image, where 100.0 is 100.
Default: 100.0.
Number (double).
Example
Section titled “Example”Exporting to PNG24 format
Section titled “Exporting to PNG24 format”// Exports current document to dest as a PNG24 file with specified options,// dest contains the full path including the file name,// saveAsHTML option creates an HTML version with the PNG file in an images folder
function exportFileToPNG24(dest) { if (app.documents.length > 0) { var exportOptions = new ExportOptionsPNG24(); exportOptions.antiAliasing = false; exportOptions.transparency = false; exportOptions.saveAsHTML = true;
var type = ExportType.PNG24; var fileSpec = new File(dest);
app.activeDocument.exportFile(fileSpec, type, exportOptions); }}