ExportOptionsTIFF
ExportOptionsTIFF
Section titled “ExportOptionsTIFF”exportOptionsTIFF
用于将文档导出为 TIFF 文件的选项,与 Document.exportFile() 方法一起使用。所有属性都是可选的。
导出文档时,会自动附加适当的文件扩展名。您不应在文件规范中包含任何文件扩展名。
ExportOptionsTIFF.antiAliasing
Section titled “ExportOptionsTIFF.antiAliasing”exportOptionsTIFF.antiAliasing
如果为 true
,导出的图像应进行抗锯齿处理。
默认值:true
。
布尔值。
ExportOptionsTIFF.artboardRange
Section titled “ExportOptionsTIFF.artboardRange”exportOptionsTIFF.artboardRange
如果 saveMultipleArtboards
为 true
,则此属性用于多资源提取,指定画板范围。空字符串表示提取所有画板。
默认值:空字符串。
字符串。
ExportOptionsTIFF.byteOrder
Section titled “ExportOptionsTIFF.byteOrder”exportOptionsTIFF.byteOrder
新文件中使用的字节顺序。
ExportOptionsTIFF.imageColorSpace
Section titled “ExportOptionsTIFF.imageColorSpace”exportOptionsTIFF.imageColorSpace
导出文件的颜色空间。
默认值:ImageColorSpace.RGB
。
ExportOptionsTIFF.lZWCompression
Section titled “ExportOptionsTIFF.lZWCompression”exportOptionsTIFF.lZWCompression
如果为 true
,则在新文件中使用 IZW 压缩。
布尔值。
ExportOptionsTIFF.resolution
Section titled “ExportOptionsTIFF.resolution”exportOptionsTIFF.resolution
导出文件的分辨率,单位为每英寸点数 (dpi)。
范围:72.0 到 2400.0。
默认值:150.0。
数字(双精度)。
ExportOptionsTIFF.saveMultipleArtboards
Section titled “ExportOptionsTIFF.saveMultipleArtboards”exportOptionsTIFF.saveMultipleArtboards
如果为 true
,则保存所有画板或指定范围的画板。
默认值:false
。
数字(双精度)。
导出为 TIFF 格式
Section titled “导出为 TIFF 格式”// 将当前文档导出为 TIFF 文件到 dest,并指定选项,// dest 包含完整路径,包括文件名
function exportFileToPSD(dest) { if (app.documents.length > 0) { var exportOptions = new ExportOptionsTIFF(); exportOptions.resolution = 150; exportOptions.byteOrder = TIFFByteOrder.IBMPC; exportOptions.lZWCompression = false;
var type = ExportType.TIFF; var fileSpec = new File(dest);
app.activeDocument.exportFile(fileSpec, type, exportOptions); }}