ExportOptionsGIF
ExportOptionsGIF
Section titled “ExportOptionsGIF”exportOptionsGIF
Description
Section titled “Description”Options for exporting a document as a GIF 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”ExportOptionsGIF.antiAliasing
Section titled “ExportOptionsGIF.antiAliasing”exportOptionsGIF.antiAliasing
Description
Section titled “Description”If true
, the exported image should be anti-aliased.
Default: true
.
Boolean.
ExportOptionsGIF.artBoardClipping
Section titled “ExportOptionsGIF.artBoardClipping”exportOptionsGIF.artBoardClipping
Description
Section titled “Description”If true
, the exported image should be clipped to the art board.
Default: false
.
Boolean.
ExportOptionsGIF.colorCount
Section titled “ExportOptionsGIF.colorCount”exportOptionsGIF.colorCount
Description
Section titled “Description”The number of colors in the exported image’s color table.
Range: 2 to 256.
Default: 128.
Number (long).
ExportOptionsGIF.colorDither
Section titled “ExportOptionsGIF.colorDither”exportOptionsGIF.colorDither
Description
Section titled “Description”The method used to dither colors in the exported image.
Default: ColorDitherMethod.DIFFUSION
.
ExportOptionsGIF.colorReduction
Section titled “ExportOptionsGIF.colorReduction”exportOptionsGIF.colorReduction
Description
Section titled “Description”The method used to reduce the number of colors in the exported image. Default: ColorReductionMethod.SELECTIVE
.
ExportOptionsGIF.ditherPercent
Section titled “ExportOptionsGIF.ditherPercent”exportOptionsGIF.ditherPercent
Description
Section titled “Description”How much should the colors of the exported image be dithered, where 100.0 is 100%.
Number (long).
ExportOptionsGIF.horizontalScale
Section titled “ExportOptionsGIF.horizontalScale”exportOptionsGIF.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).
ExportOptionsGIF.infoLossPercent
Section titled “ExportOptionsGIF.infoLossPercent”exportOptionsGIF.infoLossPercent
Description
Section titled “Description”The level of information loss allowed during compression, where 100.0 is 100%.
Number (long).
ExportOptionsGIF.interlaced
Section titled “ExportOptionsGIF.interlaced”exportOptionsGIF.interlaced
Description
Section titled “Description”If true
, the exported image should be interlaced.
Default: false
.
Boolean.
ExportOptionsGIF.matte
Section titled “ExportOptionsGIF.matte”exportOptionsGIF.matte
Description
Section titled “Description”If true
, the art board should be matted with a color.
Default: true
.
Boolean.
ExportOptionsGIF.matteColor
Section titled “ExportOptionsGIF.matteColor”exportOptionsGIF.matteColor
Description
Section titled “Description”The color to use when matting the art board.
Default: WHITE
.
ExportOptionsGIF.saveAsHTML
Section titled “ExportOptionsGIF.saveAsHTML”exportOptionsGIF.saveAsHTML
Description
Section titled “Description”If true
, the exported image should be saved with an accompanying HTML file.
Default: false
.
Boolean.
ExportOptionsGIF.transparency
Section titled “ExportOptionsGIF.transparency”exportOptionsGIF.transparency
Description
Section titled “Description”If true
, the exported image should use transparency.
Default: true
.
Boolean.
ExportOptionsGIF.typename
Section titled “ExportOptionsGIF.typename”exportOptionsGIF.typename
Description
Section titled “Description”The class name of the referenced object.
String; read-only.
ExportOptionsGIF.verticalScale
Section titled “ExportOptionsGIF.verticalScale”exportOptionsGIF.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).
ExportOptionsGIF.webSnap
Section titled “ExportOptionsGIF.webSnap”exportOptionsGIF.webSnap
Description
Section titled “Description”How much should the color table be changed to match the web palette, where 100 is maximum.
Default: 0.
Number (long).
Example
Section titled “Example”Exporting to GIF format
Section titled “Exporting to GIF format”// Exports current document to dest as a GIF file with specified options,// dest contains the full path including the file name
function exportToGIFFile(dest) { if (app.documents.length > 0) { var exportOptions = new ExportOptionsGIF(); exportOptions.antiAliasing = false; exportOptions.colorCount = 64; exportOptions.colorDither = ColorDitherMethod.DIFFUSION;
var type = ExportType.GIF; var fileSpec = new File(dest);
app.activeDocument.exportFile(fileSpec, type, exportOptions); }}