ag-psd 30.1.1 → 31.0.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/.v8-cache/v24.13.1-x64-cf738c9d/017325ac +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/01e5e61b +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/043c7b90 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/05135617 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/059f8558 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/06423db9 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/06e765df +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0706ecb8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0930679d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/09519a62 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0a6607b0 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0ad8fa6e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0d390e10 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0db754a7 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0dfa7b16 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0e9e09db +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1130885f +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1222cb8c +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/15e2c039 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/15f0e479 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1a2d469d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1b300c82 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1bc3d370 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1e44e5af +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1efa10a1 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1f6c8743 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/20477c23 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/20b27e40 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/20dfa422 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/257c62ba +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/25d60154 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/26f822f3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2a19133e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2a1e2a8d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2b02fded +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2b069ee0 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2c76dc0d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2de09439 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2deb286a +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2e44f5f0 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2fb229a9 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/3144b401 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/32018e44 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/341402c3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/34e0fa2e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/37481985 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/3bbf643e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/3ceff89e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/404f5cdc +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4087aa2b +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4376c1f9 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/44903df4 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/44d58dc8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4511bacf +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/47da0ce8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/48cd54a9 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/49d22b79 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4d938476 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4ec6d390 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4f5702bd +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/514cc428 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/557d3b42 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/56abbff7 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/57b540ee +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/57d3380b +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/5e20c081 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6024ce3f +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/61735b23 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/63dbdb75 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/651c4ada +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/652a0d59 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6a0e89ee +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6af33b91 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6c2562d2 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6cbfc0ec +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6dae0cfa +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6e2529ce +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6f08372c +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/7100ee08 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/71df9cb3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/72e1d543 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/75519c80 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/75e41e43 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/79bf115c +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/7a39347c +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/7b83e3d3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/7cd71bc5 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/7da78512 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/7ea06cea +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/82c3b573 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/84c186e4 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/8568576b +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/8607bd36 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/87372817 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/87cf2209 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/882aaa05 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/8a4d3de8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/8e223473 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/92b7aefd +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/932f0770 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/937c03a1 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/991e4758 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/9af658fb +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/9ed80ba5 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/9f0dc993 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/a19c0c4f +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/a6409d95 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/a79a40bb +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/a7e80865 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/ac9802c6 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/acc36e66 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/ad11e2dc +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/b0c8fcd8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/b1762958 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/b3c2fab7 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/b5b3329b +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/b69ed3a3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/b806679e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/bc1cdd48 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/bc7ebd1d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/bdff1628 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c0b789d2 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c314aece +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c399a5dc +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c681cbc8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c6834ffc +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c6f12ed5 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cb0f0a3d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cbcb7c95 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cdd9107c +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cdf2c4a3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cfc49f4f +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cff9434a +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/d02dd6f7 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/d0507bf3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/d60fce19 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/d733d619 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/d75b7803 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/dc86f000 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/de74e659 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/defa4f7f +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e03e2acd +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e0e3f52c +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e158d332 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e6735171 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e6745c2b +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e6b99945 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e6d8ceb8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e7ffec37 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/ea33b6de +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/eaafa3c4 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/ebb50fca +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/ec805f2e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/edaef8f1 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/ee4401c8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/eeeebdfe +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/f3d51676 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/f7b50a75 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/fa58ca72 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/fbca6276 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/fc97d72d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/fd0a2987 +0 -0
- package/CHANGELOG.md +9 -0
- package/README.md +65 -1
- package/README_PSD.md +1 -1
- package/TODO.md +2 -0
- package/dist/abr.d.ts +196 -196
- package/dist/abr.js +364 -378
- package/dist/abr.js.map +1 -1
- package/dist/additionalInfo.d.ts +26 -26
- package/dist/additionalInfo.js +3478 -3516
- package/dist/additionalInfo.js.map +1 -1
- package/dist/ase.d.ts +32 -32
- package/dist/ase.js +81 -82
- package/dist/ase.js.map +1 -1
- package/dist/bundle.js +12380 -12445
- package/dist/csh.d.ts +10 -10
- package/dist/csh.js +35 -47
- package/dist/csh.js.map +1 -1
- package/dist/descriptor.d.ts +601 -601
- package/dist/descriptor.js +2003 -2038
- package/dist/descriptor.js.map +1 -1
- package/dist/effectsHelpers.d.ts +5 -5
- package/dist/effectsHelpers.js +286 -308
- package/dist/effectsHelpers.js.map +1 -1
- package/dist/engineData.d.ts +2 -2
- package/dist/engineData.js +334 -341
- package/dist/engineData.js.map +1 -1
- package/dist/engineData2.d.ts +2 -2
- package/dist/engineData2.js +409 -411
- package/dist/engineData2.js.map +1 -1
- package/dist/helpers.d.ts +74 -74
- package/dist/helpers.js +353 -348
- package/dist/helpers.js.map +1 -1
- package/dist/imageResources.d.ts +17 -17
- package/dist/imageResources.js +1040 -1079
- package/dist/imageResources.js.map +1 -1
- package/dist/index.d.ts +20 -22
- package/dist/index.js +61 -56
- package/dist/index.js.map +1 -1
- package/dist/initializeCanvas.d.ts +1 -1
- package/dist/initializeCanvas.js +9 -10
- package/dist/initializeCanvas.js.map +1 -1
- package/dist/jpeg.d.ts +1 -1
- package/dist/jpeg.js +1020 -1021
- package/dist/jpeg.js.map +1 -1
- package/dist/psd.d.ts +1877 -1873
- package/dist/psd.js +45 -45
- package/dist/psd.js.map +1 -1
- package/dist/psdReader.d.ts +52 -45
- package/dist/psdReader.js +1385 -1293
- package/dist/psdReader.js.map +1 -1
- package/dist/psdWriter.d.ts +34 -33
- package/dist/psdWriter.js +834 -805
- package/dist/psdWriter.js.map +1 -1
- package/dist/text.d.ts +179 -179
- package/dist/text.js +552 -577
- package/dist/text.js.map +1 -1
- package/dist/utf8.d.ts +4 -6
- package/dist/utf8.js +156 -157
- package/dist/utf8.js.map +1 -1
- package/dist-es/abr.d.ts +196 -196
- package/dist-es/abr.js +364 -374
- package/dist-es/abr.js.map +1 -1
- package/dist-es/additionalInfo.d.ts +26 -26
- package/dist-es/additionalInfo.js +3478 -3510
- package/dist-es/additionalInfo.js.map +1 -1
- package/dist-es/ase.d.ts +32 -32
- package/dist-es/ase.js +81 -78
- package/dist-es/ase.js.map +1 -1
- package/dist-es/csh.d.ts +10 -10
- package/dist-es/csh.js +35 -43
- package/dist-es/csh.js.map +1 -1
- package/dist-es/descriptor.d.ts +601 -601
- package/dist-es/descriptor.js +2003 -2005
- package/dist-es/descriptor.js.map +1 -1
- package/dist-es/effectsHelpers.d.ts +5 -5
- package/dist-es/effectsHelpers.js +286 -303
- package/dist-es/effectsHelpers.js.map +1 -1
- package/dist-es/engineData.d.ts +2 -2
- package/dist-es/engineData.js +334 -336
- package/dist-es/engineData.js.map +1 -1
- package/dist-es/engineData2.d.ts +2 -2
- package/dist-es/engineData2.js +409 -407
- package/dist-es/engineData2.js.map +1 -1
- package/dist-es/helpers.d.ts +74 -74
- package/dist-es/helpers.js +353 -330
- package/dist-es/helpers.js.map +1 -1
- package/dist-es/imageResources.d.ts +17 -17
- package/dist-es/imageResources.js +1040 -1076
- package/dist-es/imageResources.js.map +1 -1
- package/dist-es/index.d.ts +20 -22
- package/dist-es/index.js +61 -33
- package/dist-es/index.js.map +1 -1
- package/dist-es/initializeCanvas.d.ts +1 -1
- package/dist-es/initializeCanvas.js +9 -6
- package/dist-es/initializeCanvas.js.map +1 -1
- package/dist-es/jpeg.d.ts +1 -1
- package/dist-es/jpeg.js +1020 -1017
- package/dist-es/jpeg.js.map +1 -1
- package/dist-es/psd.d.ts +1877 -1873
- package/dist-es/psd.js +45 -42
- package/dist-es/psd.js.map +1 -1
- package/dist-es/psdReader.d.ts +52 -45
- package/dist-es/psdReader.js +1385 -1255
- package/dist-es/psdReader.js.map +1 -1
- package/dist-es/psdWriter.d.ts +34 -33
- package/dist-es/psdWriter.js +834 -776
- package/dist-es/psdWriter.js.map +1 -1
- package/dist-es/text.d.ts +179 -179
- package/dist-es/text.js +552 -572
- package/dist-es/text.js.map +1 -1
- package/dist-es/utf8.d.ts +4 -6
- package/dist-es/utf8.js +156 -150
- package/dist-es/utf8.js.map +1 -1
- package/package.json +4 -3
- package/publish.js +24 -0
- package/src/additionalInfo.ts +15 -11
- package/src/helpers.ts +13 -3
- package/src/index.ts +4 -6
- package/src/psd.ts +4 -0
- package/src/psdReader.ts +136 -43
- package/src/psdWriter.ts +118 -24
- package/tsconfig-es6.json +2 -1
- package/tsconfig.json +5 -3
package/dist/effectsHelpers.js
CHANGED
|
@@ -1,309 +1,287 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
(0, psdWriter_1.writeSignature)(writer,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
(0, psdReader_1.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
case '
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
(0, psdReader_1.readFixedPoint32)(reader);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
if (
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
(0, psdWriter_1.
|
|
244
|
-
(0, psdWriter_1.
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
(0, psdWriter_1.
|
|
249
|
-
(
|
|
250
|
-
(0, psdWriter_1.
|
|
251
|
-
(0, psdWriter_1.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
(0, psdWriter_1.
|
|
255
|
-
|
|
256
|
-
(0, psdWriter_1.
|
|
257
|
-
|
|
258
|
-
(0, psdWriter_1.
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
(
|
|
262
|
-
(
|
|
263
|
-
(0, psdWriter_1.
|
|
264
|
-
(0, psdWriter_1.
|
|
265
|
-
|
|
266
|
-
(0, psdWriter_1.
|
|
267
|
-
(
|
|
268
|
-
|
|
269
|
-
(0, psdWriter_1.writeUint8)(writer,
|
|
270
|
-
|
|
271
|
-
(0, psdWriter_1.writeUint8)(writer, 0);
|
|
272
|
-
(0, psdWriter_1.writeColor)(writer,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
(0, psdWriter_1.writeSignature)(writer, '
|
|
277
|
-
(0, psdWriter_1.
|
|
278
|
-
(0, psdWriter_1.writeUint32)(writer,
|
|
279
|
-
(0, psdWriter_1.
|
|
280
|
-
(
|
|
281
|
-
(0, psdWriter_1.
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
(0, psdWriter_1.writeColor)(writer,
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
(0, psdWriter_1.writeUint8)(writer, style <= 0 ? 1 : style);
|
|
288
|
-
writeFixedPoint8(writer, bevel.highlightOpacity || 0);
|
|
289
|
-
writeFixedPoint8(writer, bevel.shadowOpacity || 0);
|
|
290
|
-
(0, psdWriter_1.writeUint8)(writer, bevel.enabled ? 1 : 0);
|
|
291
|
-
(0, psdWriter_1.writeUint8)(writer, bevel.useGlobalLight ? 1 : 0);
|
|
292
|
-
(0, psdWriter_1.writeUint8)(writer, bevel.direction === 'down' ? 1 : 0);
|
|
293
|
-
(0, psdWriter_1.writeColor)(writer, bevel.highlightColor);
|
|
294
|
-
(0, psdWriter_1.writeColor)(writer, bevel.shadowColor);
|
|
295
|
-
}
|
|
296
|
-
if (solidFill) {
|
|
297
|
-
(0, psdWriter_1.writeSignature)(writer, '8BIM');
|
|
298
|
-
(0, psdWriter_1.writeSignature)(writer, 'sofi');
|
|
299
|
-
(0, psdWriter_1.writeUint32)(writer, 34);
|
|
300
|
-
(0, psdWriter_1.writeUint32)(writer, 2);
|
|
301
|
-
writeBlendMode(writer, solidFill.blendMode);
|
|
302
|
-
(0, psdWriter_1.writeColor)(writer, solidFill.color);
|
|
303
|
-
writeFixedPoint8(writer, solidFill.opacity || 0);
|
|
304
|
-
(0, psdWriter_1.writeUint8)(writer, solidFill.enabled ? 1 : 0);
|
|
305
|
-
(0, psdWriter_1.writeColor)(writer, solidFill.color);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
exports.writeEffects = writeEffects;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readEffects = readEffects;
|
|
4
|
+
exports.writeEffects = writeEffects;
|
|
5
|
+
const helpers_1 = require("./helpers");
|
|
6
|
+
const psdReader_1 = require("./psdReader");
|
|
7
|
+
const psdWriter_1 = require("./psdWriter");
|
|
8
|
+
const bevelStyles = [
|
|
9
|
+
undefined, 'outer bevel', 'inner bevel', 'emboss', 'pillow emboss', 'stroke emboss'
|
|
10
|
+
];
|
|
11
|
+
function readBlendMode(reader) {
|
|
12
|
+
(0, psdReader_1.checkSignature)(reader, '8BIM');
|
|
13
|
+
return helpers_1.toBlendMode[(0, psdReader_1.readSignature)(reader)] || 'normal';
|
|
14
|
+
}
|
|
15
|
+
function writeBlendMode(writer, mode) {
|
|
16
|
+
(0, psdWriter_1.writeSignature)(writer, '8BIM');
|
|
17
|
+
(0, psdWriter_1.writeSignature)(writer, helpers_1.fromBlendMode[mode] || 'norm');
|
|
18
|
+
}
|
|
19
|
+
function readFixedPoint8(reader) {
|
|
20
|
+
return (0, psdReader_1.readUint8)(reader) / 0xff;
|
|
21
|
+
}
|
|
22
|
+
function writeFixedPoint8(writer, value) {
|
|
23
|
+
(0, psdWriter_1.writeUint8)(writer, Math.round(value * 0xff) | 0);
|
|
24
|
+
}
|
|
25
|
+
function readEffects(reader) {
|
|
26
|
+
const version = (0, psdReader_1.readUint16)(reader);
|
|
27
|
+
if (version !== 0)
|
|
28
|
+
throw new Error(`Invalid effects layer version: ${version}`);
|
|
29
|
+
const effectsCount = (0, psdReader_1.readUint16)(reader);
|
|
30
|
+
const effects = {};
|
|
31
|
+
for (let i = 0; i < effectsCount; i++) {
|
|
32
|
+
(0, psdReader_1.checkSignature)(reader, '8BIM');
|
|
33
|
+
const type = (0, psdReader_1.readSignature)(reader);
|
|
34
|
+
switch (type) {
|
|
35
|
+
case 'cmnS': { // common state (see See Effects layer, common state info)
|
|
36
|
+
const size = (0, psdReader_1.readUint32)(reader);
|
|
37
|
+
const version = (0, psdReader_1.readUint32)(reader);
|
|
38
|
+
const visible = !!(0, psdReader_1.readUint8)(reader);
|
|
39
|
+
(0, psdReader_1.skipBytes)(reader, 2);
|
|
40
|
+
if (size !== 7 || version !== 0 || !visible)
|
|
41
|
+
throw new Error(`Invalid effects common state`);
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
case 'dsdw': // drop shadow (see See Effects layer, drop shadow and inner shadow info)
|
|
45
|
+
case 'isdw': { // inner shadow (see See Effects layer, drop shadow and inner shadow info)
|
|
46
|
+
const blockSize = (0, psdReader_1.readUint32)(reader);
|
|
47
|
+
const version = (0, psdReader_1.readUint32)(reader);
|
|
48
|
+
if (blockSize !== 41 && blockSize !== 51)
|
|
49
|
+
throw new Error(`Invalid shadow size: ${blockSize}`);
|
|
50
|
+
if (version !== 0 && version !== 2)
|
|
51
|
+
throw new Error(`Invalid shadow version: ${version}`);
|
|
52
|
+
const size = (0, psdReader_1.readFixedPoint32)(reader);
|
|
53
|
+
(0, psdReader_1.readFixedPoint32)(reader); // intensity
|
|
54
|
+
const angle = (0, psdReader_1.readFixedPoint32)(reader);
|
|
55
|
+
const distance = (0, psdReader_1.readFixedPoint32)(reader);
|
|
56
|
+
const color = (0, psdReader_1.readColor)(reader);
|
|
57
|
+
const blendMode = readBlendMode(reader);
|
|
58
|
+
const enabled = !!(0, psdReader_1.readUint8)(reader);
|
|
59
|
+
const useGlobalLight = !!(0, psdReader_1.readUint8)(reader);
|
|
60
|
+
const opacity = readFixedPoint8(reader);
|
|
61
|
+
if (blockSize >= 51)
|
|
62
|
+
(0, psdReader_1.readColor)(reader); // native color
|
|
63
|
+
const shadowInfo = {
|
|
64
|
+
size: { units: 'Pixels', value: size },
|
|
65
|
+
distance: { units: 'Pixels', value: distance },
|
|
66
|
+
angle, color, blendMode, enabled, useGlobalLight, opacity
|
|
67
|
+
};
|
|
68
|
+
if (type === 'dsdw') {
|
|
69
|
+
effects.dropShadow = [shadowInfo];
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
effects.innerShadow = [shadowInfo];
|
|
73
|
+
}
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
case 'oglw': { // outer glow (see See Effects layer, outer glow info)
|
|
77
|
+
const blockSize = (0, psdReader_1.readUint32)(reader);
|
|
78
|
+
const version = (0, psdReader_1.readUint32)(reader);
|
|
79
|
+
if (blockSize !== 32 && blockSize !== 42)
|
|
80
|
+
throw new Error(`Invalid outer glow size: ${blockSize}`);
|
|
81
|
+
if (version !== 0 && version !== 2)
|
|
82
|
+
throw new Error(`Invalid outer glow version: ${version}`);
|
|
83
|
+
const size = (0, psdReader_1.readFixedPoint32)(reader);
|
|
84
|
+
(0, psdReader_1.readFixedPoint32)(reader); // intensity
|
|
85
|
+
const color = (0, psdReader_1.readColor)(reader);
|
|
86
|
+
const blendMode = readBlendMode(reader);
|
|
87
|
+
const enabled = !!(0, psdReader_1.readUint8)(reader);
|
|
88
|
+
const opacity = readFixedPoint8(reader);
|
|
89
|
+
if (blockSize >= 42)
|
|
90
|
+
(0, psdReader_1.readColor)(reader); // native color
|
|
91
|
+
effects.outerGlow = {
|
|
92
|
+
size: { units: 'Pixels', value: size },
|
|
93
|
+
color, blendMode, enabled, opacity
|
|
94
|
+
};
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
case 'iglw': { // inner glow (see See Effects layer, inner glow info)
|
|
98
|
+
const blockSize = (0, psdReader_1.readUint32)(reader);
|
|
99
|
+
const version = (0, psdReader_1.readUint32)(reader);
|
|
100
|
+
if (blockSize !== 32 && blockSize !== 43)
|
|
101
|
+
throw new Error(`Invalid inner glow size: ${blockSize}`);
|
|
102
|
+
if (version !== 0 && version !== 2)
|
|
103
|
+
throw new Error(`Invalid inner glow version: ${version}`);
|
|
104
|
+
const size = (0, psdReader_1.readFixedPoint32)(reader);
|
|
105
|
+
(0, psdReader_1.readFixedPoint32)(reader); // intensity
|
|
106
|
+
const color = (0, psdReader_1.readColor)(reader);
|
|
107
|
+
const blendMode = readBlendMode(reader);
|
|
108
|
+
const enabled = !!(0, psdReader_1.readUint8)(reader);
|
|
109
|
+
const opacity = readFixedPoint8(reader);
|
|
110
|
+
if (blockSize >= 43) {
|
|
111
|
+
(0, psdReader_1.readUint8)(reader); // inverted
|
|
112
|
+
(0, psdReader_1.readColor)(reader); // native color
|
|
113
|
+
}
|
|
114
|
+
effects.innerGlow = {
|
|
115
|
+
size: { units: 'Pixels', value: size },
|
|
116
|
+
color, blendMode, enabled, opacity
|
|
117
|
+
};
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
case 'bevl': { // bevel (see See Effects layer, bevel info)
|
|
121
|
+
const blockSize = (0, psdReader_1.readUint32)(reader);
|
|
122
|
+
const version = (0, psdReader_1.readUint32)(reader);
|
|
123
|
+
if (blockSize !== 58 && blockSize !== 78)
|
|
124
|
+
throw new Error(`Invalid bevel size: ${blockSize}`);
|
|
125
|
+
if (version !== 0 && version !== 2)
|
|
126
|
+
throw new Error(`Invalid bevel version: ${version}`);
|
|
127
|
+
const angle = (0, psdReader_1.readFixedPoint32)(reader);
|
|
128
|
+
const strength = (0, psdReader_1.readFixedPoint32)(reader);
|
|
129
|
+
const size = (0, psdReader_1.readFixedPoint32)(reader);
|
|
130
|
+
const highlightBlendMode = readBlendMode(reader);
|
|
131
|
+
const shadowBlendMode = readBlendMode(reader);
|
|
132
|
+
const highlightColor = (0, psdReader_1.readColor)(reader);
|
|
133
|
+
const shadowColor = (0, psdReader_1.readColor)(reader);
|
|
134
|
+
const style = bevelStyles[(0, psdReader_1.readUint8)(reader)] || 'inner bevel';
|
|
135
|
+
const highlightOpacity = readFixedPoint8(reader);
|
|
136
|
+
const shadowOpacity = readFixedPoint8(reader);
|
|
137
|
+
const enabled = !!(0, psdReader_1.readUint8)(reader);
|
|
138
|
+
const useGlobalLight = !!(0, psdReader_1.readUint8)(reader);
|
|
139
|
+
const direction = (0, psdReader_1.readUint8)(reader) ? 'down' : 'up';
|
|
140
|
+
if (blockSize >= 78) {
|
|
141
|
+
(0, psdReader_1.readColor)(reader); // real highlight color
|
|
142
|
+
(0, psdReader_1.readColor)(reader); // real shadow color
|
|
143
|
+
}
|
|
144
|
+
effects.bevel = {
|
|
145
|
+
size: { units: 'Pixels', value: size },
|
|
146
|
+
angle, strength, highlightBlendMode, shadowBlendMode, highlightColor, shadowColor,
|
|
147
|
+
style, highlightOpacity, shadowOpacity, enabled, useGlobalLight, direction,
|
|
148
|
+
};
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
case 'sofi': { // solid fill (Photoshop 7.0) (see See Effects layer, solid fill (added in Photoshop 7.0))
|
|
152
|
+
const size = (0, psdReader_1.readUint32)(reader);
|
|
153
|
+
const version = (0, psdReader_1.readUint32)(reader);
|
|
154
|
+
if (size !== 34)
|
|
155
|
+
throw new Error(`Invalid effects solid fill info size: ${size}`);
|
|
156
|
+
if (version !== 2)
|
|
157
|
+
throw new Error(`Invalid effects solid fill info version: ${version}`);
|
|
158
|
+
const blendMode = readBlendMode(reader);
|
|
159
|
+
const color = (0, psdReader_1.readColor)(reader);
|
|
160
|
+
const opacity = readFixedPoint8(reader);
|
|
161
|
+
const enabled = !!(0, psdReader_1.readUint8)(reader);
|
|
162
|
+
(0, psdReader_1.readColor)(reader); // native color
|
|
163
|
+
effects.solidFill = [{ blendMode, color, opacity, enabled }];
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
default:
|
|
167
|
+
throw new Error(`Invalid effect type: '${type}'`);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return effects;
|
|
171
|
+
}
|
|
172
|
+
function writeShadowInfo(writer, shadow) {
|
|
173
|
+
var _a;
|
|
174
|
+
(0, psdWriter_1.writeUint32)(writer, 51);
|
|
175
|
+
(0, psdWriter_1.writeUint32)(writer, 2);
|
|
176
|
+
(0, psdWriter_1.writeFixedPoint32)(writer, shadow.size && shadow.size.value || 0);
|
|
177
|
+
(0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity
|
|
178
|
+
(0, psdWriter_1.writeFixedPoint32)(writer, shadow.angle || 0);
|
|
179
|
+
(0, psdWriter_1.writeFixedPoint32)(writer, shadow.distance && shadow.distance.value || 0);
|
|
180
|
+
(0, psdWriter_1.writeColor)(writer, shadow.color);
|
|
181
|
+
writeBlendMode(writer, shadow.blendMode);
|
|
182
|
+
(0, psdWriter_1.writeUint8)(writer, shadow.enabled ? 1 : 0);
|
|
183
|
+
(0, psdWriter_1.writeUint8)(writer, shadow.useGlobalLight ? 1 : 0);
|
|
184
|
+
writeFixedPoint8(writer, (_a = shadow.opacity) !== null && _a !== void 0 ? _a : 1);
|
|
185
|
+
(0, psdWriter_1.writeColor)(writer, shadow.color); // native color
|
|
186
|
+
}
|
|
187
|
+
function writeEffects(writer, effects) {
|
|
188
|
+
var _a, _b, _c, _d, _e, _f;
|
|
189
|
+
const dropShadow = (_a = effects.dropShadow) === null || _a === void 0 ? void 0 : _a[0];
|
|
190
|
+
const innerShadow = (_b = effects.innerShadow) === null || _b === void 0 ? void 0 : _b[0];
|
|
191
|
+
const outerGlow = effects.outerGlow;
|
|
192
|
+
const innerGlow = effects.innerGlow;
|
|
193
|
+
const bevel = effects.bevel;
|
|
194
|
+
const solidFill = (_c = effects.solidFill) === null || _c === void 0 ? void 0 : _c[0];
|
|
195
|
+
let count = 1;
|
|
196
|
+
if (dropShadow)
|
|
197
|
+
count++;
|
|
198
|
+
if (innerShadow)
|
|
199
|
+
count++;
|
|
200
|
+
if (outerGlow)
|
|
201
|
+
count++;
|
|
202
|
+
if (innerGlow)
|
|
203
|
+
count++;
|
|
204
|
+
if (bevel)
|
|
205
|
+
count++;
|
|
206
|
+
if (solidFill)
|
|
207
|
+
count++;
|
|
208
|
+
(0, psdWriter_1.writeUint16)(writer, 0);
|
|
209
|
+
(0, psdWriter_1.writeUint16)(writer, count);
|
|
210
|
+
(0, psdWriter_1.writeSignature)(writer, '8BIM');
|
|
211
|
+
(0, psdWriter_1.writeSignature)(writer, 'cmnS');
|
|
212
|
+
(0, psdWriter_1.writeUint32)(writer, 7); // size
|
|
213
|
+
(0, psdWriter_1.writeUint32)(writer, 0); // version
|
|
214
|
+
(0, psdWriter_1.writeUint8)(writer, 1); // visible
|
|
215
|
+
(0, psdWriter_1.writeZeros)(writer, 2);
|
|
216
|
+
if (dropShadow) {
|
|
217
|
+
(0, psdWriter_1.writeSignature)(writer, '8BIM');
|
|
218
|
+
(0, psdWriter_1.writeSignature)(writer, 'dsdw');
|
|
219
|
+
writeShadowInfo(writer, dropShadow);
|
|
220
|
+
}
|
|
221
|
+
if (innerShadow) {
|
|
222
|
+
(0, psdWriter_1.writeSignature)(writer, '8BIM');
|
|
223
|
+
(0, psdWriter_1.writeSignature)(writer, 'isdw');
|
|
224
|
+
writeShadowInfo(writer, innerShadow);
|
|
225
|
+
}
|
|
226
|
+
if (outerGlow) {
|
|
227
|
+
(0, psdWriter_1.writeSignature)(writer, '8BIM');
|
|
228
|
+
(0, psdWriter_1.writeSignature)(writer, 'oglw');
|
|
229
|
+
(0, psdWriter_1.writeUint32)(writer, 42);
|
|
230
|
+
(0, psdWriter_1.writeUint32)(writer, 2);
|
|
231
|
+
(0, psdWriter_1.writeFixedPoint32)(writer, ((_d = outerGlow.size) === null || _d === void 0 ? void 0 : _d.value) || 0);
|
|
232
|
+
(0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity
|
|
233
|
+
(0, psdWriter_1.writeColor)(writer, outerGlow.color);
|
|
234
|
+
writeBlendMode(writer, outerGlow.blendMode);
|
|
235
|
+
(0, psdWriter_1.writeUint8)(writer, outerGlow.enabled ? 1 : 0);
|
|
236
|
+
writeFixedPoint8(writer, outerGlow.opacity || 0);
|
|
237
|
+
(0, psdWriter_1.writeColor)(writer, outerGlow.color);
|
|
238
|
+
}
|
|
239
|
+
if (innerGlow) {
|
|
240
|
+
(0, psdWriter_1.writeSignature)(writer, '8BIM');
|
|
241
|
+
(0, psdWriter_1.writeSignature)(writer, 'iglw');
|
|
242
|
+
(0, psdWriter_1.writeUint32)(writer, 43);
|
|
243
|
+
(0, psdWriter_1.writeUint32)(writer, 2);
|
|
244
|
+
(0, psdWriter_1.writeFixedPoint32)(writer, ((_e = innerGlow.size) === null || _e === void 0 ? void 0 : _e.value) || 0);
|
|
245
|
+
(0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity
|
|
246
|
+
(0, psdWriter_1.writeColor)(writer, innerGlow.color);
|
|
247
|
+
writeBlendMode(writer, innerGlow.blendMode);
|
|
248
|
+
(0, psdWriter_1.writeUint8)(writer, innerGlow.enabled ? 1 : 0);
|
|
249
|
+
writeFixedPoint8(writer, innerGlow.opacity || 0);
|
|
250
|
+
(0, psdWriter_1.writeUint8)(writer, 0); // inverted
|
|
251
|
+
(0, psdWriter_1.writeColor)(writer, innerGlow.color);
|
|
252
|
+
}
|
|
253
|
+
if (bevel) {
|
|
254
|
+
(0, psdWriter_1.writeSignature)(writer, '8BIM');
|
|
255
|
+
(0, psdWriter_1.writeSignature)(writer, 'bevl');
|
|
256
|
+
(0, psdWriter_1.writeUint32)(writer, 78);
|
|
257
|
+
(0, psdWriter_1.writeUint32)(writer, 2);
|
|
258
|
+
(0, psdWriter_1.writeFixedPoint32)(writer, bevel.angle || 0);
|
|
259
|
+
(0, psdWriter_1.writeFixedPoint32)(writer, bevel.strength || 0);
|
|
260
|
+
(0, psdWriter_1.writeFixedPoint32)(writer, ((_f = bevel.size) === null || _f === void 0 ? void 0 : _f.value) || 0);
|
|
261
|
+
writeBlendMode(writer, bevel.highlightBlendMode);
|
|
262
|
+
writeBlendMode(writer, bevel.shadowBlendMode);
|
|
263
|
+
(0, psdWriter_1.writeColor)(writer, bevel.highlightColor);
|
|
264
|
+
(0, psdWriter_1.writeColor)(writer, bevel.shadowColor);
|
|
265
|
+
const style = bevelStyles.indexOf(bevel.style);
|
|
266
|
+
(0, psdWriter_1.writeUint8)(writer, style <= 0 ? 1 : style);
|
|
267
|
+
writeFixedPoint8(writer, bevel.highlightOpacity || 0);
|
|
268
|
+
writeFixedPoint8(writer, bevel.shadowOpacity || 0);
|
|
269
|
+
(0, psdWriter_1.writeUint8)(writer, bevel.enabled ? 1 : 0);
|
|
270
|
+
(0, psdWriter_1.writeUint8)(writer, bevel.useGlobalLight ? 1 : 0);
|
|
271
|
+
(0, psdWriter_1.writeUint8)(writer, bevel.direction === 'down' ? 1 : 0);
|
|
272
|
+
(0, psdWriter_1.writeColor)(writer, bevel.highlightColor);
|
|
273
|
+
(0, psdWriter_1.writeColor)(writer, bevel.shadowColor);
|
|
274
|
+
}
|
|
275
|
+
if (solidFill) {
|
|
276
|
+
(0, psdWriter_1.writeSignature)(writer, '8BIM');
|
|
277
|
+
(0, psdWriter_1.writeSignature)(writer, 'sofi');
|
|
278
|
+
(0, psdWriter_1.writeUint32)(writer, 34);
|
|
279
|
+
(0, psdWriter_1.writeUint32)(writer, 2);
|
|
280
|
+
writeBlendMode(writer, solidFill.blendMode);
|
|
281
|
+
(0, psdWriter_1.writeColor)(writer, solidFill.color);
|
|
282
|
+
writeFixedPoint8(writer, solidFill.opacity || 0);
|
|
283
|
+
(0, psdWriter_1.writeUint8)(writer, solidFill.enabled ? 1 : 0);
|
|
284
|
+
(0, psdWriter_1.writeColor)(writer, solidFill.color);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
309
287
|
//# sourceMappingURL=effectsHelpers.js.map
|