psd 3.4.0 → 4.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.
- package/README.md +196 -149
- package/dist/descriptor.d.ts +20 -0
- package/dist/descriptor.d.ts.map +1 -0
- package/dist/descriptor.js +114 -0
- package/dist/descriptor.js.map +1 -0
- package/dist/engine-data.d.ts +11 -0
- package/dist/engine-data.d.ts.map +1 -0
- package/dist/engine-data.js +82 -0
- package/dist/engine-data.js.map +1 -0
- package/dist/image.d.ts +52 -0
- package/dist/image.d.ts.map +1 -0
- package/dist/image.js +301 -0
- package/dist/image.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/layer-info.d.ts +494 -0
- package/dist/layer-info.d.ts.map +1 -0
- package/dist/layer-info.js +529 -0
- package/dist/layer-info.js.map +1 -0
- package/dist/layer-styles.d.ts +160 -0
- package/dist/layer-styles.d.ts.map +1 -0
- package/dist/layer-styles.js +183 -0
- package/dist/layer-styles.js.map +1 -0
- package/dist/layer.d.ts +143 -0
- package/dist/layer.d.ts.map +1 -0
- package/dist/layer.js +249 -0
- package/dist/layer.js.map +1 -0
- package/dist/nodes.d.ts +233 -0
- package/dist/nodes.d.ts.map +1 -0
- package/dist/nodes.js +326 -0
- package/dist/nodes.js.map +1 -0
- package/dist/path-record.d.ts +34 -0
- package/dist/path-record.d.ts.map +1 -0
- package/dist/path-record.js +44 -0
- package/dist/path-record.js.map +1 -0
- package/dist/png.d.ts +10 -0
- package/dist/png.d.ts.map +1 -0
- package/dist/png.js +85 -0
- package/dist/png.js.map +1 -0
- package/dist/psd.d.ts +49 -0
- package/dist/psd.d.ts.map +1 -0
- package/dist/psd.js +106 -0
- package/dist/psd.js.map +1 -0
- package/dist/reader.d.ts +41 -0
- package/dist/reader.d.ts.map +1 -0
- package/dist/reader.js +100 -0
- package/dist/reader.js.map +1 -0
- package/dist/resources.d.ts +105 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/resources.js +173 -0
- package/dist/resources.js.map +1 -0
- package/dist/type-tool.d.ts +142 -0
- package/dist/type-tool.d.ts.map +1 -0
- package/dist/type-tool.js +222 -0
- package/dist/type-tool.js.map +1 -0
- package/package.json +26 -32
- package/src/descriptor.ts +141 -0
- package/src/engine-data.ts +86 -0
- package/src/image.ts +338 -0
- package/src/index.ts +38 -0
- package/src/layer-info.ts +578 -0
- package/src/layer-styles.ts +339 -0
- package/src/layer.ts +334 -0
- package/src/nodes.ts +411 -0
- package/src/path-record.ts +69 -0
- package/src/png.ts +92 -0
- package/src/psd.ts +133 -0
- package/src/reader.ts +125 -0
- package/src/resources.ts +273 -0
- package/src/type-tool.ts +270 -0
- package/.travis.yml +0 -5
- package/Cakefile +0 -61
- package/DEVELOPMENT.md +0 -27
- package/bower.json +0 -26
- package/docs/docco.css +0 -284
- package/docs/lib/psd/blend_mode.coffee.html +0 -72
- package/docs/lib/psd/channel_image.coffee.html +0 -81
- package/docs/lib/psd/color.coffee.html +0 -13
- package/docs/lib/psd/descriptor.coffee.html +0 -173
- package/docs/lib/psd/file.coffee.html +0 -78
- package/docs/lib/psd/header.coffee.html +0 -71
- package/docs/lib/psd/image.coffee.html +0 -94
- package/docs/lib/psd/image_export.coffee.html +0 -5
- package/docs/lib/psd/image_exports/png.coffee.html +0 -19
- package/docs/lib/psd/image_format.coffee.html +0 -8
- package/docs/lib/psd/image_formats/layer_raw.coffee.html +0 -9
- package/docs/lib/psd/image_formats/layer_rle.coffee.html +0 -10
- package/docs/lib/psd/image_formats/raw.coffee.html +0 -6
- package/docs/lib/psd/image_formats/rle.coffee.html +0 -37
- package/docs/lib/psd/image_mode.coffee.html +0 -7
- package/docs/lib/psd/image_modes/cmyk.coffee.html +0 -36
- package/docs/lib/psd/image_modes/greyscale.coffee.html +0 -17
- package/docs/lib/psd/image_modes/rgb.coffee.html +0 -32
- package/docs/lib/psd/init.coffee.html +0 -22
- package/docs/lib/psd/layer/blend_modes.coffee.html +0 -22
- package/docs/lib/psd/layer/blending_ranges.coffee.html +0 -29
- package/docs/lib/psd/layer/channel_image.coffee.html +0 -13
- package/docs/lib/psd/layer/helpers.coffee.html +0 -19
- package/docs/lib/psd/layer/info.coffee.html +0 -69
- package/docs/lib/psd/layer/mask.coffee.html +0 -11
- package/docs/lib/psd/layer/name.coffee.html +0 -15
- package/docs/lib/psd/layer/position_channels.coffee.html +0 -24
- package/docs/lib/psd/layer.coffee.html +0 -64
- package/docs/lib/psd/layer_info/blend_clipping_elements.coffee.html +0 -11
- package/docs/lib/psd/layer_info/blend_interior_elements.coffee.html +0 -11
- package/docs/lib/psd/layer_info/fill_opacity.coffee.html +0 -10
- package/docs/lib/psd/layer_info/gradient_fill.coffee.html +0 -12
- package/docs/lib/psd/layer_info/layer_id.coffee.html +0 -10
- package/docs/lib/psd/layer_info/layer_name_source.coffee.html +0 -10
- package/docs/lib/psd/layer_info/legacy_typetool.coffee.html +0 -82
- package/docs/lib/psd/layer_info/locked.coffee.html +0 -24
- package/docs/lib/psd/layer_info/metadata.coffee.html +0 -30
- package/docs/lib/psd/layer_info/nested_section_divider.coffee.html +0 -23
- package/docs/lib/psd/layer_info/object_effects.coffee.html +0 -12
- package/docs/lib/psd/layer_info/section_divider.coffee.html +0 -41
- package/docs/lib/psd/layer_info/solid_color.coffee.html +0 -24
- package/docs/lib/psd/layer_info/typetool.coffee.html +0 -121
- package/docs/lib/psd/layer_info/unicode_name.coffee.html +0 -14
- package/docs/lib/psd/layer_info/vector_mask.coffee.html +0 -37
- package/docs/lib/psd/layer_info/vector_origination.coffee.html +0 -12
- package/docs/lib/psd/layer_info/vector_stroke.coffee.html +0 -12
- package/docs/lib/psd/layer_info/vector_stroke_content.coffee.html +0 -12
- package/docs/lib/psd/layer_info.coffee.html +0 -11
- package/docs/lib/psd/layer_mask.coffee.html +0 -73
- package/docs/lib/psd/lazy_execute.coffee.html +0 -80
- package/docs/lib/psd/mask.coffee.html +0 -47
- package/docs/lib/psd/node.coffee.html +0 -100
- package/docs/lib/psd/nodes/ancestry.coffee.html +0 -47
- package/docs/lib/psd/nodes/build_preview.coffee.html +0 -6
- package/docs/lib/psd/nodes/group.coffee.html +0 -19
- package/docs/lib/psd/nodes/layer.coffee.html +0 -17
- package/docs/lib/psd/nodes/root.coffee.html +0 -61
- package/docs/lib/psd/nodes/search.coffee.html +0 -23
- package/docs/lib/psd/path_record.coffee.html +0 -73
- package/docs/lib/psd/resource.coffee.html +0 -20
- package/docs/lib/psd/resource_section.coffee.html +0 -16
- package/docs/lib/psd/resources/layer_comps.coffee.html +0 -31
- package/docs/lib/psd/resources.coffee.html +0 -44
- package/docs/lib/psd/util.coffee.html +0 -24
- package/docs/lib/psd.coffee.html +0 -85
- package/index.js +0 -2
- package/lib/psd/blend_mode.coffee +0 -78
- package/lib/psd/channel_image.coffee +0 -87
- package/lib/psd/color.coffee +0 -10
- package/lib/psd/descriptor.coffee +0 -189
- package/lib/psd/file.coffee +0 -88
- package/lib/psd/header.coffee +0 -83
- package/lib/psd/image.coffee +0 -107
- package/lib/psd/image_export.coffee +0 -2
- package/lib/psd/image_exports/png.coffee +0 -28
- package/lib/psd/image_format.coffee +0 -5
- package/lib/psd/image_formats/layer_raw.coffee +0 -6
- package/lib/psd/image_formats/layer_rle.coffee +0 -7
- package/lib/psd/image_formats/raw.coffee +0 -3
- package/lib/psd/image_formats/rle.coffee +0 -38
- package/lib/psd/image_mode.coffee +0 -4
- package/lib/psd/image_modes/cmyk.coffee +0 -36
- package/lib/psd/image_modes/greyscale.coffee +0 -14
- package/lib/psd/image_modes/rgb.coffee +0 -39
- package/lib/psd/init.coffee +0 -21
- package/lib/psd/layer/blend_modes.coffee +0 -20
- package/lib/psd/layer/blending_ranges.coffee +0 -28
- package/lib/psd/layer/channel_image.coffee +0 -10
- package/lib/psd/layer/helpers.coffee +0 -16
- package/lib/psd/layer/info.coffee +0 -76
- package/lib/psd/layer/mask.coffee +0 -8
- package/lib/psd/layer/name.coffee +0 -12
- package/lib/psd/layer/position_channels.coffee +0 -22
- package/lib/psd/layer.coffee +0 -64
- package/lib/psd/layer_info/artboard.coffee +0 -16
- package/lib/psd/layer_info/blend_clipping_elements.coffee +0 -8
- package/lib/psd/layer_info/blend_interior_elements.coffee +0 -8
- package/lib/psd/layer_info/fill_opacity.coffee +0 -7
- package/lib/psd/layer_info/gradient_fill.coffee +0 -9
- package/lib/psd/layer_info/layer_id.coffee +0 -7
- package/lib/psd/layer_info/layer_name_source.coffee +0 -7
- package/lib/psd/layer_info/legacy_typetool.coffee +0 -80
- package/lib/psd/layer_info/locked.coffee +0 -21
- package/lib/psd/layer_info/metadata.coffee +0 -27
- package/lib/psd/layer_info/nested_section_divider.coffee +0 -22
- package/lib/psd/layer_info/object_effects.coffee +0 -9
- package/lib/psd/layer_info/section_divider.coffee +0 -38
- package/lib/psd/layer_info/solid_color.coffee +0 -21
- package/lib/psd/layer_info/typetool.coffee +0 -172
- package/lib/psd/layer_info/unicode_name.coffee +0 -11
- package/lib/psd/layer_info/vector_mask.coffee +0 -35
- package/lib/psd/layer_info/vector_origination.coffee +0 -9
- package/lib/psd/layer_info/vector_stroke.coffee +0 -9
- package/lib/psd/layer_info/vector_stroke_content.coffee +0 -9
- package/lib/psd/layer_info.coffee +0 -8
- package/lib/psd/layer_mask.coffee +0 -73
- package/lib/psd/lazy_execute.coffee +0 -86
- package/lib/psd/mask.coffee +0 -52
- package/lib/psd/node.coffee +0 -150
- package/lib/psd/nodes/ancestry.coffee +0 -44
- package/lib/psd/nodes/build_preview.coffee +0 -3
- package/lib/psd/nodes/group.coffee +0 -16
- package/lib/psd/nodes/layer.coffee +0 -14
- package/lib/psd/nodes/root.coffee +0 -59
- package/lib/psd/nodes/search.coffee +0 -20
- package/lib/psd/path_record.coffee +0 -72
- package/lib/psd/resource.coffee +0 -17
- package/lib/psd/resource_section.coffee +0 -16
- package/lib/psd/resources/guides.coffee +0 -25
- package/lib/psd/resources/layer_comps.coffee +0 -28
- package/lib/psd/resources/layer_links.coffee +0 -17
- package/lib/psd/resources/resolution_info.coffee +0 -26
- package/lib/psd/resources.coffee +0 -41
- package/lib/psd/util.coffee +0 -23
- package/lib/psd.coffee +0 -92
- package/output/Logo_Glyph.png +0 -0
- package/output/Make a change and save..png +0 -0
- package/output/Matte.png +0 -0
- package/webpack.config.js +0 -23
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import type { Descriptor } from './descriptor.ts';
|
|
2
|
+
import type { BlendMode } from './layer.ts';
|
|
3
|
+
export type RGB = [number, number, number];
|
|
4
|
+
/** Layer styles (the `lfx2`/`lmfx` block, or `lfxs` for groups). Photoshop CC allows several of some effects per layer. */
|
|
5
|
+
export interface LayerStyles {
|
|
6
|
+
/** The master "show effects" switch. */
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
/** Effect scale, where 1 is 100%. */
|
|
9
|
+
scale: number;
|
|
10
|
+
dropShadows: Shadow[];
|
|
11
|
+
innerShadows: Shadow[];
|
|
12
|
+
outerGlows: Glow[];
|
|
13
|
+
innerGlows: Glow[];
|
|
14
|
+
bevels: Bevel[];
|
|
15
|
+
satins: Satin[];
|
|
16
|
+
colorOverlays: ColorOverlay[];
|
|
17
|
+
gradientOverlays: GradientOverlay[];
|
|
18
|
+
patternOverlays: PatternOverlay[];
|
|
19
|
+
strokes: Stroke[];
|
|
20
|
+
/** The raw descriptor, for anything not covered above. */
|
|
21
|
+
data: Descriptor;
|
|
22
|
+
}
|
|
23
|
+
interface Effect {
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
blendMode: BlendMode | string | undefined;
|
|
26
|
+
/** 0 to 1. */
|
|
27
|
+
opacity: number;
|
|
28
|
+
}
|
|
29
|
+
export interface Shadow extends Effect {
|
|
30
|
+
/** Undefined for colors that can't be converted, such as book colors. */
|
|
31
|
+
color: RGB | undefined;
|
|
32
|
+
/** Degrees. */
|
|
33
|
+
angle: number;
|
|
34
|
+
useGlobalLight: boolean;
|
|
35
|
+
distance: number;
|
|
36
|
+
/** "Spread" for drop shadows, "choke" for inner shadows, in pixels. */
|
|
37
|
+
spread: number;
|
|
38
|
+
size: number;
|
|
39
|
+
/** 0 to 1. */
|
|
40
|
+
noise: number;
|
|
41
|
+
antiAlias: boolean;
|
|
42
|
+
contour: string | undefined;
|
|
43
|
+
}
|
|
44
|
+
export interface Glow extends Effect {
|
|
45
|
+
/** Glows use either a color or a gradient. */
|
|
46
|
+
color: RGB | undefined;
|
|
47
|
+
gradient: Gradient | undefined;
|
|
48
|
+
/** `SfBL` (softer) or `PrBL` (precise). */
|
|
49
|
+
technique: string | undefined;
|
|
50
|
+
/** "Spread" for outer glows, "choke" for inner glows, in pixels. */
|
|
51
|
+
spread: number;
|
|
52
|
+
size: number;
|
|
53
|
+
noise: number;
|
|
54
|
+
jitter: number;
|
|
55
|
+
range: number;
|
|
56
|
+
/** Inner glows only: `SrcC` (center) or `SrcE` (edge). */
|
|
57
|
+
source: string | undefined;
|
|
58
|
+
antiAlias: boolean;
|
|
59
|
+
contour: string | undefined;
|
|
60
|
+
}
|
|
61
|
+
export interface Bevel {
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
/** `OtrB` (outer bevel), `InrB` (inner bevel), `Embs` (emboss), `PlEb` (pillow emboss) or `strokeEmboss`. */
|
|
64
|
+
style: string | undefined;
|
|
65
|
+
/** `SfBL` (smooth), `PrBL` (chisel hard) or `Slmt` (chisel soft). */
|
|
66
|
+
technique: string | undefined;
|
|
67
|
+
/** 0 to 10 (1 = 100%). */
|
|
68
|
+
depth: number;
|
|
69
|
+
direction: 'up' | 'down';
|
|
70
|
+
size: number;
|
|
71
|
+
soften: number;
|
|
72
|
+
angle: number;
|
|
73
|
+
altitude: number;
|
|
74
|
+
useGlobalLight: boolean;
|
|
75
|
+
highlight: {
|
|
76
|
+
blendMode: BlendMode | string | undefined;
|
|
77
|
+
color: RGB | undefined;
|
|
78
|
+
opacity: number;
|
|
79
|
+
};
|
|
80
|
+
shadow: {
|
|
81
|
+
blendMode: BlendMode | string | undefined;
|
|
82
|
+
color: RGB | undefined;
|
|
83
|
+
opacity: number;
|
|
84
|
+
};
|
|
85
|
+
antiAlias: boolean;
|
|
86
|
+
contour: string | undefined;
|
|
87
|
+
}
|
|
88
|
+
export interface Satin extends Effect {
|
|
89
|
+
color: RGB | undefined;
|
|
90
|
+
angle: number;
|
|
91
|
+
distance: number;
|
|
92
|
+
size: number;
|
|
93
|
+
invert: boolean;
|
|
94
|
+
antiAlias: boolean;
|
|
95
|
+
contour: string | undefined;
|
|
96
|
+
}
|
|
97
|
+
export interface ColorOverlay extends Effect {
|
|
98
|
+
color: RGB | undefined;
|
|
99
|
+
}
|
|
100
|
+
export interface GradientStop {
|
|
101
|
+
/** 0 to 1. */
|
|
102
|
+
location: number;
|
|
103
|
+
/** 0 to 1. */
|
|
104
|
+
midpoint: number;
|
|
105
|
+
}
|
|
106
|
+
export interface Gradient {
|
|
107
|
+
name: string;
|
|
108
|
+
/** `CstS` (solid) or `ClNs` (noise). */
|
|
109
|
+
type: string | undefined;
|
|
110
|
+
/** 0 to 1. */
|
|
111
|
+
smoothness: number;
|
|
112
|
+
colorStops: Array<GradientStop & {
|
|
113
|
+
color: RGB | undefined;
|
|
114
|
+
}>;
|
|
115
|
+
opacityStops: Array<GradientStop & {
|
|
116
|
+
opacity: number;
|
|
117
|
+
}>;
|
|
118
|
+
}
|
|
119
|
+
export interface GradientOverlay extends Effect {
|
|
120
|
+
gradient: Gradient | undefined;
|
|
121
|
+
angle: number;
|
|
122
|
+
/** `Lnr` (linear), `Rdl` (radial), `Angl` (angle), `Rflc` (reflected) or `Dmnd` (diamond). */
|
|
123
|
+
style: string | undefined;
|
|
124
|
+
reverse: boolean;
|
|
125
|
+
alignWithLayer: boolean;
|
|
126
|
+
/** 1 = 100%. */
|
|
127
|
+
scale: number;
|
|
128
|
+
/** Percent of the layer size. */
|
|
129
|
+
offset: {
|
|
130
|
+
x: number;
|
|
131
|
+
y: number;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export interface PatternOverlay extends Effect {
|
|
135
|
+
pattern: {
|
|
136
|
+
name: string;
|
|
137
|
+
id: string;
|
|
138
|
+
} | undefined;
|
|
139
|
+
scale: number;
|
|
140
|
+
alignWithLayer: boolean;
|
|
141
|
+
}
|
|
142
|
+
export interface Stroke extends Effect {
|
|
143
|
+
size: number;
|
|
144
|
+
/** `OutF` (outside), `InsF` (inside) or `CtrF` (center). */
|
|
145
|
+
position: string | undefined;
|
|
146
|
+
/** `SClr` (color), `GrFl` (gradient) or `Ptrn` (pattern). */
|
|
147
|
+
fillType: string | undefined;
|
|
148
|
+
color: RGB | undefined;
|
|
149
|
+
gradient: Gradient | undefined;
|
|
150
|
+
pattern: {
|
|
151
|
+
name: string;
|
|
152
|
+
id: string;
|
|
153
|
+
} | undefined;
|
|
154
|
+
}
|
|
155
|
+
/** Converts a descriptor color to RGB. */
|
|
156
|
+
export declare function descriptorColor(c: Descriptor | undefined): RGB | undefined;
|
|
157
|
+
/** Normalizes the layer styles descriptor. */
|
|
158
|
+
export declare function readLayerStyles(data: Descriptor): LayerStyles;
|
|
159
|
+
export {};
|
|
160
|
+
//# sourceMappingURL=layer-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layer-styles.d.ts","sourceRoot":"","sources":["../src/layer-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE3C,2HAA2H;AAC3H,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EA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QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,KAAK,EAAE,GAAG,GAAG,SAAS,CAAC;IACvB,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;CACnD;AA4CD,0CAA0C;AAC1C,wBAAgB,eAAe,CAAC,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,GAAG,GAAG,SAAS,CA6B1E;AA6FD,8CAA8C;AAC9C,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,CAwB7D"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { labToRgb } from './image.js';
|
|
2
|
+
const BLEND_MODES = {
|
|
3
|
+
Nrml: 'normal',
|
|
4
|
+
Dslv: 'dissolve',
|
|
5
|
+
Drkn: 'darken',
|
|
6
|
+
Mltp: 'multiply',
|
|
7
|
+
CBrn: 'color_burn',
|
|
8
|
+
linearBurn: 'linear_burn',
|
|
9
|
+
darkerColor: 'darker_color',
|
|
10
|
+
Lghn: 'lighten',
|
|
11
|
+
Scrn: 'screen',
|
|
12
|
+
CDdg: 'color_dodge',
|
|
13
|
+
linearDodge: 'linear_dodge',
|
|
14
|
+
lighterColor: 'lighter_color',
|
|
15
|
+
Ovrl: 'overlay',
|
|
16
|
+
SftL: 'soft_light',
|
|
17
|
+
HrdL: 'hard_light',
|
|
18
|
+
vividLight: 'vivid_light',
|
|
19
|
+
linearLight: 'linear_light',
|
|
20
|
+
pinLight: 'pin_light',
|
|
21
|
+
hardMix: 'hard_mix',
|
|
22
|
+
Dfrn: 'difference',
|
|
23
|
+
Xclu: 'exclusion',
|
|
24
|
+
blendSubtraction: 'subtract',
|
|
25
|
+
blendDivide: 'divide',
|
|
26
|
+
H: 'hue',
|
|
27
|
+
Strt: 'saturation',
|
|
28
|
+
Clr: 'color',
|
|
29
|
+
Lmns: 'luminosity',
|
|
30
|
+
passThrough: 'passthru',
|
|
31
|
+
};
|
|
32
|
+
/** Unit values (`{ value }`) and plain numbers as a number. */
|
|
33
|
+
const num = (v) => (typeof v === 'object' && v !== null ? v.value : (v ?? 0));
|
|
34
|
+
const percent = (v) => num(v) / 100;
|
|
35
|
+
const enumValue = (v) => v?.value?.trim();
|
|
36
|
+
const blendMode = (v) => {
|
|
37
|
+
const value = enumValue(v);
|
|
38
|
+
return value === undefined ? undefined : (BLEND_MODES[value] ?? value);
|
|
39
|
+
};
|
|
40
|
+
const contour = (v) => v?.['Nm '];
|
|
41
|
+
const pattern = (v) => (v ? { name: v['Nm '], id: v.Idnt } : undefined);
|
|
42
|
+
/** Converts a descriptor color to RGB. */
|
|
43
|
+
export function descriptorColor(c) {
|
|
44
|
+
if (!c)
|
|
45
|
+
return undefined;
|
|
46
|
+
const round = (values) => values.map((v) => Math.round(Math.min(Math.max(v, 0), 255)));
|
|
47
|
+
switch (c.class.id) {
|
|
48
|
+
case 'RGBC':
|
|
49
|
+
return 'redFloat' in c
|
|
50
|
+
? round([c.redFloat * 255, c.greenFloat * 255, c.blueFloat * 255])
|
|
51
|
+
: round([c['Rd '], c['Grn '], c['Bl ']]);
|
|
52
|
+
case 'Grsc': {
|
|
53
|
+
const gray = 255 - (num(c['Gry ']) * 255) / 100;
|
|
54
|
+
return round([gray, gray, gray]);
|
|
55
|
+
}
|
|
56
|
+
case 'HSBC': {
|
|
57
|
+
const [h, s, v] = [num(c['H ']) / 60, c['Strt'] / 100, c['Brgh'] / 100];
|
|
58
|
+
const f = (n) => {
|
|
59
|
+
const k = (n + h) % 6;
|
|
60
|
+
return 255 * (v - v * s * Math.max(0, Math.min(k, 4 - k, 1)));
|
|
61
|
+
};
|
|
62
|
+
return round([f(5), f(3), f(1)]);
|
|
63
|
+
}
|
|
64
|
+
case 'CMYC': {
|
|
65
|
+
const k = c['Blck'] / 100;
|
|
66
|
+
return round([c['Cyn '], c['Mgnt'], c['Ylw ']].map((v) => 255 * (1 - v / 100) * (1 - k)));
|
|
67
|
+
}
|
|
68
|
+
case 'LbCl':
|
|
69
|
+
return labToRgb((c['Lmnc'] * 255) / 100, c['A '] + 128, c['B '] + 128);
|
|
70
|
+
default:
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function gradient(g) {
|
|
75
|
+
if (!g)
|
|
76
|
+
return undefined;
|
|
77
|
+
const stop = (s) => ({ location: s.Lctn / 4096, midpoint: s.Mdpn / 100 });
|
|
78
|
+
return {
|
|
79
|
+
name: g['Nm '],
|
|
80
|
+
type: enumValue(g.GrdF),
|
|
81
|
+
smoothness: (g.Intr ?? 4096) / 4096,
|
|
82
|
+
colorStops: (g.Clrs ?? []).map((s) => ({ ...stop(s), color: descriptorColor(s['Clr ']) })),
|
|
83
|
+
opacityStops: (g.Trns ?? []).map((s) => ({ ...stop(s), opacity: percent(s.Opct) })),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
const effect = (d) => ({ enabled: d.enab ?? false, blendMode: blendMode(d['Md ']), opacity: percent(d.Opct) });
|
|
87
|
+
const shadow = (d) => ({
|
|
88
|
+
...effect(d),
|
|
89
|
+
color: descriptorColor(d['Clr ']),
|
|
90
|
+
angle: num(d.lagl),
|
|
91
|
+
useGlobalLight: d.uglg ?? false,
|
|
92
|
+
distance: num(d.Dstn),
|
|
93
|
+
spread: num(d.Ckmt),
|
|
94
|
+
size: num(d.blur),
|
|
95
|
+
noise: percent(d.Nose),
|
|
96
|
+
antiAlias: d.AntA ?? false,
|
|
97
|
+
contour: contour(d.TrnS),
|
|
98
|
+
});
|
|
99
|
+
const glow = (d) => ({
|
|
100
|
+
...effect(d),
|
|
101
|
+
color: descriptorColor(d['Clr ']),
|
|
102
|
+
gradient: gradient(d.Grad),
|
|
103
|
+
technique: enumValue(d.GlwT),
|
|
104
|
+
spread: num(d.Ckmt),
|
|
105
|
+
size: num(d.blur),
|
|
106
|
+
noise: percent(d.Nose),
|
|
107
|
+
jitter: percent(d.ShdN),
|
|
108
|
+
range: percent(d.Inpr),
|
|
109
|
+
source: enumValue(d.glwS),
|
|
110
|
+
antiAlias: d.AntA ?? false,
|
|
111
|
+
contour: contour(d.TrnS),
|
|
112
|
+
});
|
|
113
|
+
const bevel = (d) => ({
|
|
114
|
+
enabled: d.enab ?? false,
|
|
115
|
+
style: enumValue(d.bvlS),
|
|
116
|
+
technique: enumValue(d.bvlT),
|
|
117
|
+
depth: percent(d.srgR),
|
|
118
|
+
direction: enumValue(d.bvlD) === 'Out' ? 'down' : 'up',
|
|
119
|
+
size: num(d.blur),
|
|
120
|
+
soften: num(d.Sftn),
|
|
121
|
+
angle: num(d.lagl),
|
|
122
|
+
altitude: num(d.Lald),
|
|
123
|
+
useGlobalLight: d.uglg ?? false,
|
|
124
|
+
highlight: { blendMode: blendMode(d.hglM), color: descriptorColor(d.hglC), opacity: percent(d.hglO) },
|
|
125
|
+
shadow: { blendMode: blendMode(d.sdwM), color: descriptorColor(d.sdwC), opacity: percent(d.sdwO) },
|
|
126
|
+
antiAlias: d.AntA ?? false,
|
|
127
|
+
contour: contour(d.TrnS),
|
|
128
|
+
});
|
|
129
|
+
const satin = (d) => ({
|
|
130
|
+
...effect(d),
|
|
131
|
+
color: descriptorColor(d['Clr ']),
|
|
132
|
+
angle: num(d.lagl),
|
|
133
|
+
distance: num(d.Dstn),
|
|
134
|
+
size: num(d.blur),
|
|
135
|
+
invert: d.Invr ?? false,
|
|
136
|
+
antiAlias: d.AntA ?? false,
|
|
137
|
+
contour: contour(d.MpgS),
|
|
138
|
+
});
|
|
139
|
+
const gradientOverlay = (d) => ({
|
|
140
|
+
...effect(d),
|
|
141
|
+
gradient: gradient(d.Grad),
|
|
142
|
+
angle: num(d.Angl),
|
|
143
|
+
style: enumValue(d.Type),
|
|
144
|
+
reverse: d.Rvrs ?? false,
|
|
145
|
+
alignWithLayer: d.Algn ?? false,
|
|
146
|
+
scale: percent(d['Scl ']),
|
|
147
|
+
offset: { x: num(d.Ofst?.Hrzn), y: num(d.Ofst?.Vrtc) },
|
|
148
|
+
});
|
|
149
|
+
const stroke = (d) => ({
|
|
150
|
+
...effect(d),
|
|
151
|
+
size: num(d['Sz ']),
|
|
152
|
+
position: enumValue(d.Styl),
|
|
153
|
+
fillType: enumValue(d.PntT),
|
|
154
|
+
color: descriptorColor(d['Clr ']),
|
|
155
|
+
gradient: gradient(d.Grad),
|
|
156
|
+
pattern: pattern(d.Ptrn),
|
|
157
|
+
});
|
|
158
|
+
/** Normalizes the layer styles descriptor. */
|
|
159
|
+
export function readLayerStyles(data) {
|
|
160
|
+
// Each effect is stored singly, or as a list under a `...Multi` key in Photoshop CC.
|
|
161
|
+
const list = (single, multi) => (multi && data[multi]) || (data[single] ? [data[single]] : []);
|
|
162
|
+
return {
|
|
163
|
+
enabled: data.masterFXSwitch ?? true,
|
|
164
|
+
scale: data['Scl '] ? percent(data['Scl ']) : 1,
|
|
165
|
+
dropShadows: list('DrSh', 'dropShadowMulti').map(shadow),
|
|
166
|
+
innerShadows: list('IrSh', 'innerShadowMulti').map(shadow),
|
|
167
|
+
outerGlows: list('OrGl').map(glow),
|
|
168
|
+
innerGlows: list('IrGl').map(glow),
|
|
169
|
+
bevels: list('ebbl').map(bevel),
|
|
170
|
+
satins: list('ChFX').map(satin),
|
|
171
|
+
colorOverlays: list('SoFi', 'solidFillMulti').map((d) => ({ ...effect(d), color: descriptorColor(d['Clr ']) })),
|
|
172
|
+
gradientOverlays: list('GrFl', 'gradientFillMulti').map(gradientOverlay),
|
|
173
|
+
patternOverlays: list('patternFill').map((d) => ({
|
|
174
|
+
...effect(d),
|
|
175
|
+
pattern: pattern(d.Ptrn),
|
|
176
|
+
scale: percent(d['Scl ']),
|
|
177
|
+
alignWithLayer: d.Algn ?? false,
|
|
178
|
+
})),
|
|
179
|
+
strokes: list('FrFX', 'frameFXMulti').map(stroke),
|
|
180
|
+
data,
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=layer-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layer-styles.js","sourceRoot":"","sources":["../src/layer-styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAmJtC,MAAM,WAAW,GAA8B;IAC7C,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,cAAc;IAC3B,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,cAAc;IAC3B,YAAY,EAAE,eAAe;IAC7B,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,cAAc;IAC3B,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,UAAU;IACnB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,WAAW;IACjB,gBAAgB,EAAE,UAAU;IAC5B,WAAW,EAAE,QAAQ;IACrB,CAAC,EAAE,KAAK;IACR,IAAI,EAAE,YAAY;IAClB,GAAG,EAAE,OAAO;IACZ,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,UAAU;CACxB,CAAC;AAEF,+DAA+D;AAC/D,MAAM,GAAG,GAAG,CAAC,CAAM,EAAU,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC3F,MAAM,OAAO,GAAG,CAAC,CAAM,EAAE,EAAE,CA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M,CAAC;QACjD,IAAI;KACL,CAAC;AACJ,CAAC"}
|
package/dist/layer.d.ts
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { LayerImage } from './image.ts';
|
|
2
|
+
import { type LayerInfo } from './layer-info.ts';
|
|
3
|
+
import type { Header } from './psd.ts';
|
|
4
|
+
import { type Reader } from './reader.ts';
|
|
5
|
+
import type { Resources } from './resources.ts';
|
|
6
|
+
export declare const BLEND_MODES: {
|
|
7
|
+
readonly norm: 'normal';
|
|
8
|
+
readonly dark: 'darken';
|
|
9
|
+
readonly lite: 'lighten';
|
|
10
|
+
readonly hue: 'hue';
|
|
11
|
+
readonly sat: 'saturation';
|
|
12
|
+
readonly colr: 'color';
|
|
13
|
+
readonly lum: 'luminosity';
|
|
14
|
+
readonly mul: 'multiply';
|
|
15
|
+
readonly scrn: 'screen';
|
|
16
|
+
readonly diss: 'dissolve';
|
|
17
|
+
readonly over: 'overlay';
|
|
18
|
+
readonly hLit: 'hard_light';
|
|
19
|
+
readonly sLit: 'soft_light';
|
|
20
|
+
readonly diff: 'difference';
|
|
21
|
+
readonly smud: 'exclusion';
|
|
22
|
+
readonly div: 'color_dodge';
|
|
23
|
+
readonly idiv: 'color_burn';
|
|
24
|
+
readonly lbrn: 'linear_burn';
|
|
25
|
+
readonly lddg: 'linear_dodge';
|
|
26
|
+
readonly vLit: 'vivid_light';
|
|
27
|
+
readonly lLit: 'linear_light';
|
|
28
|
+
readonly pLit: 'pin_light';
|
|
29
|
+
readonly hMix: 'hard_mix';
|
|
30
|
+
readonly pass: 'passthru';
|
|
31
|
+
readonly dkCl: 'darker_color';
|
|
32
|
+
readonly lgCl: 'lighter_color';
|
|
33
|
+
readonly fsub: 'subtract';
|
|
34
|
+
readonly fdiv: 'divide';
|
|
35
|
+
};
|
|
36
|
+
export type BlendMode = (typeof BLEND_MODES)[keyof typeof BLEND_MODES];
|
|
37
|
+
export declare const blendModeName: (key: string) => BlendMode | undefined;
|
|
38
|
+
export interface ChannelInfo {
|
|
39
|
+
/** 0, 1, 2... are color channels, -1 is transparency, -2 the user mask, -3 the real user mask. */
|
|
40
|
+
id: number;
|
|
41
|
+
length: number;
|
|
42
|
+
/** Offset of the channel's image data in the file. */
|
|
43
|
+
offset: number;
|
|
44
|
+
}
|
|
45
|
+
export interface Mask {
|
|
46
|
+
top: number;
|
|
47
|
+
left: number;
|
|
48
|
+
bottom: number;
|
|
49
|
+
right: number;
|
|
50
|
+
width: number;
|
|
51
|
+
height: number;
|
|
52
|
+
defaultColor: number;
|
|
53
|
+
/** Position is relative to the layer. */
|
|
54
|
+
relative: boolean;
|
|
55
|
+
disabled: boolean;
|
|
56
|
+
invert: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface BlendingRange {
|
|
59
|
+
source: {
|
|
60
|
+
black: [number, number];
|
|
61
|
+
white: [number, number];
|
|
62
|
+
};
|
|
63
|
+
dest: {
|
|
64
|
+
black: [number, number];
|
|
65
|
+
white: [number, number];
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export interface BlendingRanges {
|
|
69
|
+
grey: BlendingRange;
|
|
70
|
+
channels: BlendingRange[];
|
|
71
|
+
}
|
|
72
|
+
/** A tagged block found in a layer record, located by file offset. */
|
|
73
|
+
export interface InfoBlock {
|
|
74
|
+
key: string;
|
|
75
|
+
offset: number;
|
|
76
|
+
length: number;
|
|
77
|
+
}
|
|
78
|
+
export interface GlobalMask {
|
|
79
|
+
overlayColorSpace: number;
|
|
80
|
+
colorComponents: number[];
|
|
81
|
+
/** 0 (transparent) to 100 (opaque). */
|
|
82
|
+
opacity: number;
|
|
83
|
+
/** 0 = color selected, 1 = color protected, 128 = use value stored per layer. */
|
|
84
|
+
kind: number;
|
|
85
|
+
}
|
|
86
|
+
export declare const readBlockLength: (r: Reader, header: Header, key: string) => number;
|
|
87
|
+
/**
|
|
88
|
+
* A raw layer record. Section dividers (the start and end markers of groups) are layers too;
|
|
89
|
+
* use `psd.tree` for the document hierarchy.
|
|
90
|
+
*/
|
|
91
|
+
export declare class Layer {
|
|
92
|
+
#private;
|
|
93
|
+
readonly header: Header;
|
|
94
|
+
readonly top: number;
|
|
95
|
+
readonly left: number;
|
|
96
|
+
readonly bottom: number;
|
|
97
|
+
readonly right: number;
|
|
98
|
+
readonly channels: ChannelInfo[];
|
|
99
|
+
/** The raw 4-character blend mode key, e.g. `norm`. */
|
|
100
|
+
readonly blendKey: string;
|
|
101
|
+
/** 0-255. */
|
|
102
|
+
readonly opacity: number;
|
|
103
|
+
/** Clipped to the layer below it. */
|
|
104
|
+
readonly clipped: boolean;
|
|
105
|
+
readonly flags: number;
|
|
106
|
+
readonly mask: Mask | undefined;
|
|
107
|
+
readonly blendingRanges: BlendingRanges | undefined;
|
|
108
|
+
/** The pre-Photoshop 5 name. Prefer `name`. */
|
|
109
|
+
readonly legacyName: string;
|
|
110
|
+
/** Every tagged block key in this layer, including ones this library can't parse. */
|
|
111
|
+
readonly infoBlocks: InfoBlock[];
|
|
112
|
+
/** Parsed additional layer information, keyed by name. Each block is parsed on first access. */
|
|
113
|
+
readonly info: LayerInfo;
|
|
114
|
+
constructor(r: Reader, header: Header, resources: () => Resources);
|
|
115
|
+
get width(): number;
|
|
116
|
+
get height(): number;
|
|
117
|
+
get name(): string;
|
|
118
|
+
/** The layer's unique ID, if the file has one. */
|
|
119
|
+
get id(): number | undefined;
|
|
120
|
+
get visible(): boolean;
|
|
121
|
+
get blendMode(): BlendMode | undefined;
|
|
122
|
+
/** 0-255. */
|
|
123
|
+
get fillOpacity(): number;
|
|
124
|
+
/** Starts a group (folder) in the flat layer list. */
|
|
125
|
+
get isFolder(): boolean;
|
|
126
|
+
/** Ends a group in the flat layer list. */
|
|
127
|
+
get isFolderEnd(): boolean;
|
|
128
|
+
/** The layer's pixels. Decoding happens on demand. */
|
|
129
|
+
get image(): LayerImage;
|
|
130
|
+
}
|
|
131
|
+
export interface LayerSection {
|
|
132
|
+
/** Top to bottom, including group start/end dividers. */
|
|
133
|
+
layers: Layer[];
|
|
134
|
+
globalMask: GlobalMask | undefined;
|
|
135
|
+
/** The first alpha channel of the composite image holds the merged transparency. */
|
|
136
|
+
mergedAlpha: boolean;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Parses the layer and mask information section. `r` is positioned at its length field.
|
|
140
|
+
* `resources` is only read when decoding indexed color layers, which need the color table.
|
|
141
|
+
*/
|
|
142
|
+
export declare function readLayerSection(r: Reader, header: Header, resources: () => Resources): LayerSection;
|
|
143
|
+
//# sourceMappingURL=layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../src/layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,eAAO,MAAM,WAAW;aACtB,IAAI,EAAE,QAAQ;aACd,IAAI,EAAE,QAAQ;aACd,IAAI,EAAE,SAAS;aACf,GAAG,EAAE,KAAK;aACV,GAAG,EAAE,YAAY;aACjB,IAAI,EAAE,OAAO;aACb,GAAG,EAAE,YAAY;aACjB,GAAG,EAAE,UAAU;aACf,IAAI,EAAE,QAAQ;aACd,IAAI,EAAE,UAAU;aAChB,IAAI,EAAE,SAAS;aACf,IAAI,EAAE,YAAY;aAClB,IAAI,EAAE,YAAY;aAClB,IAAI,EAAE,YAAY;aAClB,IAAI,EAAE,WAAW;aACjB,GAAG,EAAE,aAAa;aAClB,IAAI,EAAE,YAAY;aAClB,IAAI,EAAE,aAAa;aACnB,IAAI,EAAE,cAAc;aACpB,IAAI,EAAE,aAAa;aACnB,IAAI,EAAE,cAAc;aACpB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