@ps-generator-bridge/generator 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/LICENSE +21 -0
  2. package/dist/contract-C4vydf6-.d.ts +1270 -0
  3. package/dist/contract.d.ts +3 -0
  4. package/dist/contract.js +19 -0
  5. package/dist/contract.js.map +1 -0
  6. package/dist/index.d.ts +8 -0
  7. package/dist/index.js +2482 -0
  8. package/dist/index.js.map +1 -0
  9. package/jsx/Action/autoCutout.jsx +12 -0
  10. package/jsx/Action/redo.jsx +5 -0
  11. package/jsx/Action/removeBackground.jsx +10 -0
  12. package/jsx/Common/alert.jsx +4 -0
  13. package/jsx/Common/debug.jsx +43 -0
  14. package/jsx/Common/event-dispatch.jsx +4 -0
  15. package/jsx/Document/exportDocument.jsx +128 -0
  16. package/jsx/Document/getDocumentInfo.jsx +222 -0
  17. package/jsx/Document/openPsd.jsx +6 -0
  18. package/jsx/Document/openPsdFile.jsx +7 -0
  19. package/jsx/Document/saveDocument.jsx +37 -0
  20. package/jsx/Layer/addImageLayer.jsx +182 -0
  21. package/jsx/Layer/createSelectionStroke.jsx +44 -0
  22. package/jsx/Layer/getActiveLayerID.jsx +1 -0
  23. package/jsx/Layer/getLayerBounds.jsx +114 -0
  24. package/jsx/Layer/getLayerInfo.jsx +323 -0
  25. package/jsx/Layer/getLayerPixmap.jsx +337 -0
  26. package/jsx/Layer/getSelection.jsx +6 -0
  27. package/jsx/Layer/layer.jsx +284 -0
  28. package/jsx/Layer/saveEngineDataToLayer.jsx +26 -0
  29. package/jsx/Layer/setLayerWorkpathMask.jsx +126 -0
  30. package/jsx/Layer/transformLayer.jsx +121 -0
  31. package/jsx/Selection/getSelectionPath.jsx +389 -0
  32. package/jsx/Selection/pathtosvg.jsx +257 -0
  33. package/jsx/Selection/registerEvent.jsx +10 -0
  34. package/jsx/Selection/selectiontopath.jsx +9 -0
  35. package/jsx/polyfills/Array.js +159 -0
  36. package/jsx/polyfills/Function.js +29 -0
  37. package/jsx/polyfills/JSON.js +182 -0
  38. package/jsx/polyfills/Number.js +24 -0
  39. package/jsx/polyfills/Object.js +80 -0
  40. package/jsx/polyfills/String.js +87 -0
  41. package/jsx/types/extendscript/README.md +34 -0
  42. package/jsx/types/extendscript/actions.d.ts +148 -0
  43. package/jsx/types/extendscript/application.d.ts +74 -0
  44. package/jsx/types/extendscript/channel.d.ts +70 -0
  45. package/jsx/types/extendscript/color.d.ts +92 -0
  46. package/jsx/types/extendscript/document.d.ts +110 -0
  47. package/jsx/types/extendscript/enums.d.ts +796 -0
  48. package/jsx/types/extendscript/index.d.ts +504 -0
  49. package/jsx/types/extendscript/layer.d.ts +530 -0
  50. package/jsx/types/extendscript/misc.d.ts +274 -0
  51. package/jsx/types/extendscript/open-options.d.ts +86 -0
  52. package/jsx/types/extendscript/path.d.ts +196 -0
  53. package/jsx/types/extendscript/save-options.d.ts +144 -0
  54. package/jsx/types/extendscript/selection.d.ts +191 -0
  55. package/jsx/types/extendscript/text.d.ts +169 -0
  56. package/main.js +16 -0
  57. package/package.json +75 -0
@@ -0,0 +1,274 @@
1
+ /**
2
+ * Photoshop 杂项类型声明
3
+ * 来源: https://theiviaxx.github.io/photoshop-docs/Photoshop/
4
+ */
5
+
6
+ declare class UnitValue {
7
+ value: number;
8
+ type: string;
9
+ as(unit: string): number;
10
+ convert(unit: string): boolean;
11
+ }
12
+
13
+ type Rectangle = [number, number, number, number];
14
+
15
+ declare class Preferences {
16
+ additionalPluginFolder: File;
17
+ appendExtension: MacExtensionType;
18
+ askBeforeSavingLayeredTIFF: boolean;
19
+ autoUpdateOpenDocuments: boolean;
20
+ exportClipboard: boolean;
21
+ imagePreviews: SaveBehavior;
22
+ macOSThumbnail: boolean;
23
+ maxRAMuse: number;
24
+ maximizeCompatibility: QueryStateType;
25
+ saveLogItems: SaveLogItemsType;
26
+ saveLogItemsFile: File;
27
+ useAdditionalPluginFolder: boolean;
28
+ useDiffusionDither: boolean;
29
+ useHistoryLog: boolean;
30
+ useLowerCaseExtension: boolean;
31
+ windowsThumbnail: boolean;
32
+ beepWhenDone: boolean;
33
+ colorChannelsInColor: boolean;
34
+ colorPicker: ColorPicker;
35
+ dynamicColorSliders: boolean;
36
+ fontPreviewSize: FontPreviewType;
37
+ fullSizePreview: boolean;
38
+ gamutWarningOpacity: number;
39
+ iconPreview: boolean;
40
+ imageCacheForHistograms: boolean;
41
+ keyboardZoomResizesWindows: boolean;
42
+ otherCursors: OtherPaintingCursors;
43
+ paintingCursors: PaintingCursors;
44
+ pixelDoubling: boolean;
45
+ savePaletteLocations: boolean;
46
+ showAsianTextOptions: boolean;
47
+ showEnglishFontNames: boolean;
48
+ showSliceNumber: boolean;
49
+ showToolTips: boolean;
50
+ smartQuotes: boolean;
51
+ textFontSize: FontSize;
52
+ useShiftKeyForToolSwitch: boolean;
53
+ useVideoAlpha: boolean;
54
+ columnGutter: number;
55
+ columnWidth: number;
56
+ gridSize: GridSize;
57
+ gridStyle: GridLineStyle;
58
+ gridSubDivisions: number;
59
+ guideStyle: GuideLineStyle;
60
+ interpolation: ResampleMethod;
61
+ pointSize: PointType;
62
+ rulerUnits: Units;
63
+ typeUnits: TypeUnits;
64
+ createFirstSnapshot: boolean;
65
+ editLogItems: EditLogItemsType;
66
+ imageCacheLevels: number;
67
+ nonLinearHistory: boolean;
68
+ numberOfHistoryStates: number;
69
+ recentFileListLength: number;
70
+ readonly parent: Application;
71
+ readonly typename: string;
72
+ }
73
+
74
+ declare class Guide {
75
+ direction: Direction;
76
+ coordinate: number;
77
+ readonly parent: Document;
78
+ readonly typename: string;
79
+ remove(): void;
80
+ }
81
+
82
+ declare class Guides {
83
+ readonly length: number;
84
+ readonly parent: Document;
85
+ readonly typename: string;
86
+ [index: number]: Guide;
87
+ add(direction: Direction, coordinate: number): Guide;
88
+ removeAll(): void;
89
+ }
90
+
91
+ declare class HistoryState {
92
+ readonly name: string;
93
+ readonly snapshot: boolean;
94
+ readonly parent: Document;
95
+ readonly typename: string;
96
+ }
97
+
98
+ declare class HistoryStates {
99
+ readonly length: number;
100
+ readonly parent: Document;
101
+ readonly typename: string;
102
+ [index: number]: HistoryState;
103
+ getByName(name: string): HistoryState;
104
+ }
105
+
106
+ declare class Notifier {
107
+ readonly event: string;
108
+ readonly eventClass: string;
109
+ readonly eventFile: File;
110
+ readonly parent: Application;
111
+ readonly typename: string;
112
+ remove(): void;
113
+ }
114
+
115
+ declare class Notifiers {
116
+ readonly length: number;
117
+ readonly parent: Application;
118
+ readonly typename: string;
119
+ [index: number]: Notifier;
120
+ add(event: string, eventFile: File, eventClass?: string): Notifier;
121
+ removeAll(): void;
122
+ }
123
+
124
+ declare class ColorSampler {
125
+ readonly color: SolidColor;
126
+ readonly position: [number, number];
127
+ readonly parent: Document;
128
+ readonly typename: string;
129
+ move(position: [number, number]): void;
130
+ remove(): void;
131
+ }
132
+
133
+ declare class ColorSamplers {
134
+ readonly length: number;
135
+ readonly parent: Document;
136
+ readonly typename: string;
137
+ [index: number]: ColorSampler;
138
+ add(position: [number, number]): ColorSampler;
139
+ removeAll(): void;
140
+ }
141
+
142
+ declare class CountItem {
143
+ readonly position: [number, number];
144
+ readonly parent: Document;
145
+ readonly typename: string;
146
+ remove(): void;
147
+ }
148
+
149
+ declare class CountItems {
150
+ readonly length: number;
151
+ readonly parent: Document;
152
+ readonly typename: string;
153
+ [index: number]: CountItem;
154
+ add(position: [number, number]): CountItem;
155
+ removeAll(): void;
156
+ }
157
+
158
+ declare class XMPMetadata {
159
+ readonly author: string;
160
+ readonly caption: string;
161
+ readonly copyrightNotice: string;
162
+ copyrightStatus: CopyrightedType;
163
+ copyrightInfoURL: string;
164
+ readonly creationDate: string;
165
+ city: string;
166
+ country: string;
167
+ credit: string;
168
+ exif: any;
169
+ headline: string;
170
+ instructions: string;
171
+ ISOCountryCode: string;
172
+ keywords: string[];
173
+ provinceState: string;
174
+ source: string;
175
+ title: string;
176
+ readonly parent: Document;
177
+ readonly typename: string;
178
+ rawData: string;
179
+ }
180
+
181
+ declare class DocumentInfo {
182
+ author: string;
183
+ authorPosition: string;
184
+ caption: string;
185
+ captionWriter: string;
186
+ city: string;
187
+ copyrightNotice: string;
188
+ copyrightStatus: CopyrightedType;
189
+ copyrightInfoURL: string;
190
+ country: string;
191
+ readonly creationDate: string;
192
+ credit: string;
193
+ headline: string;
194
+ instructions: string;
195
+ ISOCountryCode: string;
196
+ keywords: string[];
197
+ ownerUrl: string;
198
+ provinceState: string;
199
+ source: string;
200
+ supplementalCategories: string[];
201
+ title: string;
202
+ urgency: Urgency;
203
+ readonly parent: Document;
204
+ readonly typename: string;
205
+ }
206
+
207
+ declare class DocumentPrintSettings {
208
+ background: SolidColor;
209
+ bleedWidth: number;
210
+ caption: boolean;
211
+ colorBars: boolean;
212
+ colorHandling: PrintColorHandling;
213
+ copies: number;
214
+ cropMarks: boolean;
215
+ hardProof: boolean;
216
+ flip: boolean;
217
+ registrationMarks: boolean;
218
+ printerName: string;
219
+ negative: boolean;
220
+ labels: boolean;
221
+ readonly parent: Document;
222
+ readonly typename: string;
223
+ }
224
+
225
+ declare class MeasurementScale {
226
+ name: string;
227
+ pixelLength: number;
228
+ logicalLength: number;
229
+ logicalUnit: string;
230
+ readonly parent: Document;
231
+ readonly typename: string;
232
+ }
233
+
234
+ declare class MeasurementLog {
235
+ readonly parent: Application;
236
+ readonly typename: string;
237
+ exportMeasurements(file: File, range?: MeasurementRange, dataPoints?: string[]): void;
238
+ deleteMeasurements(range?: MeasurementRange): void;
239
+ }
240
+
241
+ declare class BatchOptions {
242
+ destinationFolder: Folder;
243
+ destination: BatchDestinationType;
244
+ errorFile: File;
245
+ fileNaming: FileNamingType[];
246
+ macintoshCompatible: boolean;
247
+ overrideOpen: boolean;
248
+ overrideSave: boolean;
249
+ startingSerial: number;
250
+ suppressOpen: boolean;
251
+ suppressProfile: boolean;
252
+ unixCompatible: boolean;
253
+ windowsCompatible: boolean;
254
+ }
255
+
256
+ declare class ExportOptions {}
257
+
258
+ declare class ExportOptionsIllustrator extends ExportOptions {
259
+ path: IllustratorPathType;
260
+ pathName: string;
261
+ }
262
+
263
+ declare class ExportOptionsSaveForWeb extends ExportOptions {
264
+ includeProfile: boolean;
265
+ dither: number;
266
+ ditherType: DitherType;
267
+ format: SaveDocumentType;
268
+ interlaced: boolean;
269
+ colors: number;
270
+ quality: number;
271
+ optimized: boolean;
272
+ transparency: boolean;
273
+ webSnap: number;
274
+ }
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Photoshop 打开选项类型声明
3
+ * 来源: https://theiviaxx.github.io/photoshop-docs/Photoshop/
4
+ */
5
+
6
+ /** Camera RAW 打开选项 */
7
+ declare class CameraRAWOpenOptions {
8
+ blueSaturation: number;
9
+ brightness: number;
10
+ chromaticAberrationBY: number;
11
+ chromaticAberrationRC: number;
12
+ colorNoiseReduction: number;
13
+ colorSpace: ColorSpaceType;
14
+ contrast: number;
15
+ exposure: number;
16
+ greenSaturation: number;
17
+ highBitDepth: boolean;
18
+ lensVignettingAmount: number;
19
+ lensVignettingMidpoint: number;
20
+ luminanceSmoothing: number;
21
+ redSaturation: number;
22
+ saturation: number;
23
+ shadowTint: number;
24
+ sharpness: number;
25
+ size: CameraRAWSize;
26
+ tint: number;
27
+ settings: CameraRAWSettingsType;
28
+ whiteBalance: WhiteBalanceType;
29
+ }
30
+
31
+ /** DICOM 打开选项 */
32
+ declare class DICOMOpenOptions {
33
+ anonymize: boolean;
34
+ columns: number;
35
+ reverseImage: boolean;
36
+ rows: number;
37
+ showOverlays: boolean;
38
+ windowLevel: number;
39
+ windowWidth: number;
40
+ }
41
+
42
+ /** 通用 EPS 打开选项 */
43
+ declare class GenericEPSOpenOptions {
44
+ antiAlias: boolean;
45
+ constrainProportions: boolean;
46
+ height: number;
47
+ mode: OpenDocumentMode;
48
+ resolution: number;
49
+ width: number;
50
+ }
51
+
52
+ /** 通用 PDF 打开选项 */
53
+ declare class GenericPDFOpenOptions {
54
+ antiAlias: boolean;
55
+ bitsPerChannel: BitsPerChannelType;
56
+ cropPage: CropToType;
57
+ constrainProportions: boolean;
58
+ height: number;
59
+ image: number;
60
+ mode: OpenDocumentMode;
61
+ page: number;
62
+ resolution: number;
63
+ suppressWarnings: boolean;
64
+ usePageNumber: boolean;
65
+ width: number;
66
+ }
67
+
68
+ /** PhotoCD 打开选项 */
69
+ declare class PhotoCDOpenOptions {
70
+ colorProfileName: string;
71
+ colorSpace: ColorSpaceType;
72
+ orientation: Orientation;
73
+ pixelSize: PhotoCDColorSpace;
74
+ resolution: number;
75
+ }
76
+
77
+ /** Raw 格式打开选项 */
78
+ declare class RawFormatOpenOptions {
79
+ bitsPerChannel: number;
80
+ byteOrder: ByteOrderType;
81
+ channelNumber: number;
82
+ headerSize: number;
83
+ height: number;
84
+ retainHeader: boolean;
85
+ width: number;
86
+ }
@@ -0,0 +1,196 @@
1
+ /**
2
+ * Photoshop 路径类型声明
3
+ * 来源: https://theiviaxx.github.io/photoshop-docs/Photoshop/
4
+ */
5
+
6
+ // ============================================================
7
+ // 路径点相关
8
+ // ============================================================
9
+
10
+ /** 路径点(PathPoints 集合中的元素)*/
11
+ declare class PathPoint {
12
+ /** 前向控制点(贝塞尔曲线的方向锚点)[x, y] */
13
+ leftDirection: [number, number];
14
+ /** 路径点的坐标 [x, y] */
15
+ anchor: [number, number];
16
+ /** 后向控制点(贝塞尔曲线的方向锚点)[x, y] */
17
+ rightDirection: [number, number];
18
+ /** 点类型(角点或平滑点)*/
19
+ kind: PointKind;
20
+ /** 对象的容器(只读)*/
21
+ readonly parent: SubPathItem;
22
+ /** 对象的类名(只读)*/
23
+ readonly typename: string;
24
+ }
25
+
26
+ /** 路径点集合 */
27
+ declare class PathPoints {
28
+ /** 路径点数量(只读)*/
29
+ readonly length: number;
30
+ /** 对象的容器(只读)*/
31
+ readonly parent: SubPathItem;
32
+ /** 对象的类名(只读)*/
33
+ readonly typename: string;
34
+ /** 通过索引访问路径点 */
35
+ [index: number]: PathPoint;
36
+ }
37
+
38
+ /** 路径点信息(用于创建路径时)*/
39
+ declare class PathPointInfo {
40
+ /** 前向控制点 [x, y] */
41
+ leftDirection: [number, number];
42
+ /** 路径点的坐标 [x, y] */
43
+ anchor: [number, number];
44
+ /** 后向控制点 [x, y] */
45
+ rightDirection: [number, number];
46
+ /** 点类型 */
47
+ kind: PointKind;
48
+
49
+ constructor();
50
+ }
51
+
52
+ // ============================================================
53
+ // 子路径相关
54
+ // ============================================================
55
+
56
+ /** 子路径项 */
57
+ declare class SubPathItem {
58
+ /** 如果为 true,则子路径是封闭的(只读)*/
59
+ readonly closed: boolean;
60
+ /** 子路径中的路径点(只读)*/
61
+ readonly pathPoints: PathPoints;
62
+ /** 对象的容器(只读)*/
63
+ readonly parent: PathItem;
64
+ /** 对象的类名(只读)*/
65
+ readonly typename: string;
66
+ }
67
+
68
+ /** 子路径集合 */
69
+ declare class SubPathItems {
70
+ /** 子路径数量(只读)*/
71
+ readonly length: number;
72
+ /** 对象的容器(只读)*/
73
+ readonly parent: PathItem;
74
+ /** 对象的类名(只读)*/
75
+ readonly typename: string;
76
+ /** 通过索引访问子路径 */
77
+ [index: number]: SubPathItem;
78
+ }
79
+
80
+ /** 子路径信息(用于创建路径时)*/
81
+ declare class SubPathInfo {
82
+ /** 是否封闭 */
83
+ closed: boolean;
84
+ /** 路径点信息数组 */
85
+ entireSubPath: PathPointInfo[];
86
+ /** 路径操作类型 */
87
+ operation: ShapeOperation;
88
+
89
+ constructor();
90
+ }
91
+
92
+ // ============================================================
93
+ // 路径项
94
+ // ============================================================
95
+
96
+ /**
97
+ * 表示一个路径或绘制对象(例如形状的轮廓或直线/曲线),
98
+ * 其中包含构成其几何结构的子路径。
99
+ */
100
+ declare class PathItem {
101
+ /** 路径的类型(只读)*/
102
+ readonly kind: PathKind;
103
+ /** 路径项的名称 */
104
+ name: string;
105
+ /** 对象的容器(只读)*/
106
+ readonly parent: Document;
107
+ /** 此路径项的子路径对象(只读)*/
108
+ readonly subPathItems: SubPathItems;
109
+ /** 对象的类名(只读)*/
110
+ readonly typename: string;
111
+
112
+ /** 取消选中路径 */
113
+ deselect(): void;
114
+
115
+ /**
116
+ * 复制此路径项。
117
+ * @param targetDocument 目标文档(可选)
118
+ * @param placement 放置位置(可选)
119
+ */
120
+ duplicate(targetDocument?: Document, placement?: ElementPlacement): PathItem;
121
+
122
+ /**
123
+ * 填充路径所包围的区域。
124
+ * @param fillColor 填充颜色(可选)
125
+ * @param mode 混合模式(可选)
126
+ * @param opacity 不透明度(可选)
127
+ * @param preserveTransparency 是否保留透明度(可选)
128
+ * @param feather 羽化量(可选)
129
+ * @param antiAlias 是否消除锯齿(可选)
130
+ * @param wholePath 是否填充整个路径(可选)
131
+ */
132
+ fillPath(
133
+ fillColor?: SolidColor,
134
+ mode?: BlendMode,
135
+ opacity?: number,
136
+ preserveTransparency?: boolean,
137
+ feather?: number,
138
+ antiAlias?: boolean,
139
+ wholePath?: boolean
140
+ ): void;
141
+
142
+ /**
143
+ * 将此路径项设为此文档的剪切路径。
144
+ * @param flatness 平坦度(可选)
145
+ */
146
+ makeClippingPath(flatness?: number): void;
147
+
148
+ /**
149
+ * 从此路径项对象创建一个选定对象。
150
+ * @param feather 羽化量(可选)
151
+ * @param antiAlias 是否消除锯齿(可选)
152
+ * @param operation 选区操作类型(可选)
153
+ */
154
+ makeSelection(feather?: number, antiAlias?: boolean, operation?: SelectionType): void;
155
+
156
+ /** 删除此路径 */
157
+ remove(): void;
158
+
159
+ /** 将此路径项设为活动或选定路径项 */
160
+ select(): void;
161
+
162
+ /**
163
+ * 描边路径。
164
+ * @param tool 描边使用的工具(可选)
165
+ * @param simulatePressure 是否模拟压力(可选)
166
+ */
167
+ strokePath(tool?: ToolType, simulatePressure?: boolean): void;
168
+ }
169
+
170
+ /** 路径集合 */
171
+ declare class PathItems {
172
+ /** 路径数量(只读)*/
173
+ readonly length: number;
174
+ /** 对象的容器(只读)*/
175
+ readonly parent: Document;
176
+ /** 对象的类名(只读)*/
177
+ readonly typename: string;
178
+ /** 通过索引访问路径项 */
179
+ [index: number]: PathItem;
180
+
181
+ /**
182
+ * 新建路径。
183
+ * @param name 路径名称
184
+ * @param entirePath 路径信息数组
185
+ */
186
+ add(name: string, entirePath: SubPathInfo[]): PathItem;
187
+
188
+ /**
189
+ * 通过名称获取路径。
190
+ * @param name 路径名称
191
+ */
192
+ getByName(name: string): PathItem;
193
+
194
+ /** 删除所有路径 */
195
+ removeAll(): void;
196
+ }
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Photoshop 保存选项类型声明
3
+ * 来源: https://theiviaxx.github.io/photoshop-docs/Photoshop/
4
+ */
5
+
6
+ /** 用于将文档保存为 JPEG 格式的选项 */
7
+ declare class JPEGSaveOptions {
8
+ embedColorProfile: boolean;
9
+ formatOptions: FormatOptionsType;
10
+ matte: MatteType;
11
+ quality: number;
12
+ scans: number;
13
+ }
14
+
15
+ /** 用于将文档保存为 PNG 格式的选项 */
16
+ declare class PNGSaveOptions {
17
+ compression: number;
18
+ interlaced: boolean;
19
+ }
20
+
21
+ /** 用于保存 Photoshop 文档(PSD 格式)的选项 */
22
+ declare class PhotoshopSaveOptions {
23
+ alphaChannels: boolean;
24
+ annotations: boolean;
25
+ embedColorProfile: boolean;
26
+ layers: boolean;
27
+ spotColors: boolean;
28
+ }
29
+
30
+ /** 用于以 TIFF 格式保存文档的选项 */
31
+ declare class TiffSaveOptions {
32
+ alphaChannels: boolean;
33
+ annotations: boolean;
34
+ byteOrder: ByteOrderType;
35
+ embedColorProfile: boolean;
36
+ imageCompression: TiffEncodingType;
37
+ interleaveChannels: boolean;
38
+ jpegQuality: number;
39
+ layerCompression: LayerCompressionType;
40
+ layers: boolean;
41
+ saveImagePyramid: boolean;
42
+ spotColors: boolean;
43
+ transparency: boolean;
44
+ }
45
+
46
+ /** 用于将文档保存为 BMP 格式的选项 */
47
+ declare class BMPSaveOptions {
48
+ flipRowOrder: boolean;
49
+ osType: OperatingSystem;
50
+ rleCompression: boolean;
51
+ }
52
+
53
+ /** 用于将文档保存为 CompuServe GIF 格式的选项 */
54
+ declare class GIFSaveOptions {
55
+ colors: number;
56
+ dither: DitherType;
57
+ ditherAmount: number;
58
+ palette: PaletteType;
59
+ preserveExactColors: boolean;
60
+ transparency: boolean;
61
+ }
62
+
63
+ /** 用于将文档保存为 EPS 格式的选项 */
64
+ declare class EPSSaveOptions {
65
+ embedColorProfile: boolean;
66
+ encoding: SaveEncoding;
67
+ halftoneScreen: boolean;
68
+ interpolation: boolean;
69
+ preview: MacPreviewType;
70
+ psColorManagement: boolean;
71
+ transparentWhites: boolean;
72
+ vectorData: boolean;
73
+ }
74
+
75
+ /** 用于将文档保存为 Photoshop PDF 格式的选项 */
76
+ declare class PDFSaveOptions {
77
+ alphaChannels: boolean;
78
+ annotations: boolean;
79
+ colorConversion: boolean;
80
+ colorProfile: string;
81
+ compatibility: PDFCompatibilityType;
82
+ convertDotsToHyphens: boolean;
83
+ description: string;
84
+ downSample: PDFResampleType;
85
+ downSampleSize: number;
86
+ downSampleSizeLimit: number;
87
+ embedColorProfile: boolean;
88
+ embedFonts: boolean;
89
+ encoding: PDFEncodingType;
90
+ interpolation: boolean;
91
+ jpegQuality: number;
92
+ layers: boolean;
93
+ optimizeForWeb: boolean;
94
+ password: string;
95
+ pDFStandard: PDFStandardType;
96
+ preserveEditing: boolean;
97
+ spotColors: boolean;
98
+ tiles: boolean;
99
+ transparency: boolean;
100
+ view: boolean;
101
+ }
102
+
103
+ /** 用于将文档保存为 Targa 格式的选项 */
104
+ declare class TargaSaveOptions {
105
+ resolution: TargaBitsPerPixels;
106
+ rleCompression: boolean;
107
+ transparency: boolean;
108
+ }
109
+
110
+ /** 用于将文档保存为 DCS 1.0 格式的选项 */
111
+ declare class DCS1_SaveOptions {
112
+ embedColorProfile: boolean;
113
+ encoding: SaveEncoding;
114
+ halftoneScreen: boolean;
115
+ interpolation: boolean;
116
+ preview: MacPreviewType;
117
+ dCS: DCSType;
118
+ vectorData: boolean;
119
+ }
120
+
121
+ /** 用于将文档保存为 DCS 2.0 格式的选项 */
122
+ declare class DCS2_SaveOptions {
123
+ embedColorProfile: boolean;
124
+ encoding: SaveEncoding;
125
+ halftoneScreen: boolean;
126
+ interpolation: boolean;
127
+ multiFileDCS: boolean;
128
+ preview: MacPreviewType;
129
+ spotColors: boolean;
130
+ dCS: DCSType;
131
+ vectorData: boolean;
132
+ }
133
+
134
+ /** 用于将文档保存为 SGI RGB 格式的选项 */
135
+ declare class SGIRGBSaveOptions {
136
+ alphaChannels: boolean;
137
+ spotColors: boolean;
138
+ }
139
+
140
+ /** 用于将文档保存为 Raw 格式的选项 */
141
+ declare class RawSaveOptions {
142
+ alphaChannels: boolean;
143
+ interleavedChannels: boolean;
144
+ }