mirror of
https://gitee.com/onvia/ccc-tnt-psd2ui
synced 2024-12-26 11:48:25 +00:00
2040 lines
325 KiB
JavaScript
2040 lines
325 KiB
JavaScript
var __assign = (this && this.__assign) || function () {
|
|
__assign = Object.assign || function(t) {
|
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
s = arguments[i];
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
t[p] = s[p];
|
|
}
|
|
return t;
|
|
};
|
|
return __assign.apply(this, arguments);
|
|
};
|
|
import { fromByteArray, toByteArray } from 'base64-js';
|
|
import { readEffects, writeEffects } from './effectsHelpers';
|
|
import { clamp, createEnum, layerColors, MOCK_HANDLERS } from './helpers';
|
|
import { readSignature, readUnicodeString, skipBytes, readUint32, readUint8, readFloat64, readUint16, readBytes, readInt16, checkSignature, readFloat32, readFixedPointPath32, readSection, readColor, readInt32, readPascalString, readUnicodeStringWithLength, readAsciiString, readPattern, } from './psdReader';
|
|
import { writeZeros, writeSignature, writeBytes, writeUint32, writeUint16, writeFloat64, writeUint8, writeInt16, writeFloat32, writeFixedPointPath32, writeUnicodeString, writeSection, writeUnicodeStringWithPadding, writeColor, writePascalString, writeInt32, } from './psdWriter';
|
|
import { Annt, BlnM, parsePercent, parseUnits, parseUnitsOrNumber, strokeStyleLineAlignment, strokeStyleLineCapType, strokeStyleLineJoinType, textGridding, unitsPercent, unitsValue, warpStyle, writeVersionAndDescriptor, readVersionAndDescriptor, Ornt, horzVrtcToXY, xyToHorzVrtc, serializeEffects, parseEffects, parseColor, serializeColor, serializeVectorContent, parseVectorContent, parseTrackList, serializeTrackList, } from './descriptor';
|
|
import { serializeEngineData, parseEngineData } from './engineData';
|
|
import { encodeEngineData, decodeEngineData } from './text';
|
|
export var infoHandlers = [];
|
|
export var infoHandlersMap = {};
|
|
function addHandler(key, has, read, write) {
|
|
var handler = { key: key, has: has, read: read, write: write };
|
|
infoHandlers.push(handler);
|
|
infoHandlersMap[handler.key] = handler;
|
|
}
|
|
function addHandlerAlias(key, target) {
|
|
infoHandlersMap[key] = infoHandlersMap[target];
|
|
}
|
|
function hasKey(key) {
|
|
return function (target) { return target[key] !== undefined; };
|
|
}
|
|
function readLength64(reader) {
|
|
if (readUint32(reader))
|
|
throw new Error("Resource size above 4 GB limit at ".concat(reader.offset.toString(16)));
|
|
return readUint32(reader);
|
|
}
|
|
function writeLength64(writer, length) {
|
|
writeUint32(writer, 0);
|
|
writeUint32(writer, length);
|
|
}
|
|
addHandler('TySh', hasKey('text'), function (reader, target, leftBytes) {
|
|
if (readInt16(reader) !== 1)
|
|
throw new Error("Invalid TySh version");
|
|
var transform = [];
|
|
for (var i = 0; i < 6; i++)
|
|
transform.push(readFloat64(reader));
|
|
if (readInt16(reader) !== 50)
|
|
throw new Error("Invalid TySh text version");
|
|
var text = readVersionAndDescriptor(reader);
|
|
if (readInt16(reader) !== 1)
|
|
throw new Error("Invalid TySh warp version");
|
|
var warp = readVersionAndDescriptor(reader);
|
|
target.text = {
|
|
transform: transform,
|
|
left: readFloat32(reader),
|
|
top: readFloat32(reader),
|
|
right: readFloat32(reader),
|
|
bottom: readFloat32(reader),
|
|
text: text['Txt '].replace(/\r/g, '\n'),
|
|
index: text.TextIndex || 0,
|
|
gridding: textGridding.decode(text.textGridding),
|
|
antiAlias: Annt.decode(text.AntA),
|
|
orientation: Ornt.decode(text.Ornt),
|
|
warp: {
|
|
style: warpStyle.decode(warp.warpStyle),
|
|
value: warp.warpValue || 0,
|
|
perspective: warp.warpPerspective || 0,
|
|
perspectiveOther: warp.warpPerspectiveOther || 0,
|
|
rotate: Ornt.decode(warp.warpRotate),
|
|
},
|
|
};
|
|
if (text.EngineData) {
|
|
var engineData = decodeEngineData(parseEngineData(text.EngineData));
|
|
// const before = parseEngineData(text.EngineData);
|
|
// const after = encodeEngineData(engineData);
|
|
// require('fs').writeFileSync('before.txt', require('util').inspect(before, false, 99, false), 'utf8');
|
|
// require('fs').writeFileSync('after.txt', require('util').inspect(after, false, 99, false), 'utf8');
|
|
// console.log(require('util').inspect(parseEngineData(text.EngineData), false, 99, true));
|
|
target.text = __assign(__assign({}, target.text), engineData);
|
|
// console.log(require('util').inspect(target.text, false, 99, true));
|
|
}
|
|
skipBytes(reader, leftBytes());
|
|
}, function (writer, target) {
|
|
var text = target.text;
|
|
var warp = text.warp || {};
|
|
var transform = text.transform || [1, 0, 0, 1, 0, 0];
|
|
var textDescriptor = {
|
|
'Txt ': (text.text || '').replace(/\r?\n/g, '\r'),
|
|
textGridding: textGridding.encode(text.gridding),
|
|
Ornt: Ornt.encode(text.orientation),
|
|
AntA: Annt.encode(text.antiAlias),
|
|
TextIndex: text.index || 0,
|
|
EngineData: serializeEngineData(encodeEngineData(text)),
|
|
};
|
|
writeInt16(writer, 1); // version
|
|
for (var i = 0; i < 6; i++) {
|
|
writeFloat64(writer, transform[i]);
|
|
}
|
|
writeInt16(writer, 50); // text version
|
|
writeVersionAndDescriptor(writer, '', 'TxLr', textDescriptor);
|
|
writeInt16(writer, 1); // warp version
|
|
writeVersionAndDescriptor(writer, '', 'warp', encodeWarp(warp));
|
|
writeFloat32(writer, text.left);
|
|
writeFloat32(writer, text.top);
|
|
writeFloat32(writer, text.right);
|
|
writeFloat32(writer, text.bottom);
|
|
// writeZeros(writer, 2);
|
|
});
|
|
// vector fills
|
|
addHandler('SoCo', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined &&
|
|
target.vectorFill.type === 'color'; }, function (reader, target) {
|
|
var descriptor = readVersionAndDescriptor(reader);
|
|
target.vectorFill = parseVectorContent(descriptor);
|
|
}, function (writer, target) {
|
|
var descriptor = serializeVectorContent(target.vectorFill).descriptor;
|
|
writeVersionAndDescriptor(writer, '', 'null', descriptor);
|
|
});
|
|
addHandler('GdFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined &&
|
|
(target.vectorFill.type === 'solid' || target.vectorFill.type === 'noise'); }, function (reader, target, left) {
|
|
var descriptor = readVersionAndDescriptor(reader);
|
|
target.vectorFill = parseVectorContent(descriptor);
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var descriptor = serializeVectorContent(target.vectorFill).descriptor;
|
|
writeVersionAndDescriptor(writer, '', 'null', descriptor);
|
|
});
|
|
addHandler('PtFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined &&
|
|
target.vectorFill.type === 'pattern'; }, function (reader, target) {
|
|
var descriptor = readVersionAndDescriptor(reader);
|
|
target.vectorFill = parseVectorContent(descriptor);
|
|
}, function (writer, target) {
|
|
var descriptor = serializeVectorContent(target.vectorFill).descriptor;
|
|
writeVersionAndDescriptor(writer, '', 'null', descriptor);
|
|
});
|
|
addHandler('vscg', function (target) { return target.vectorFill !== undefined && target.vectorStroke !== undefined; }, function (reader, target, left) {
|
|
readSignature(reader); // key
|
|
var desc = readVersionAndDescriptor(reader);
|
|
target.vectorFill = parseVectorContent(desc);
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var _a = serializeVectorContent(target.vectorFill), descriptor = _a.descriptor, key = _a.key;
|
|
writeSignature(writer, key);
|
|
writeVersionAndDescriptor(writer, '', 'null', descriptor);
|
|
});
|
|
export function readBezierKnot(reader, width, height) {
|
|
var y0 = readFixedPointPath32(reader) * height;
|
|
var x0 = readFixedPointPath32(reader) * width;
|
|
var y1 = readFixedPointPath32(reader) * height;
|
|
var x1 = readFixedPointPath32(reader) * width;
|
|
var y2 = readFixedPointPath32(reader) * height;
|
|
var x2 = readFixedPointPath32(reader) * width;
|
|
return [x0, y0, x1, y1, x2, y2];
|
|
}
|
|
function writeBezierKnot(writer, points, width, height) {
|
|
writeFixedPointPath32(writer, points[1] / height); // y0
|
|
writeFixedPointPath32(writer, points[0] / width); // x0
|
|
writeFixedPointPath32(writer, points[3] / height); // y1
|
|
writeFixedPointPath32(writer, points[2] / width); // x1
|
|
writeFixedPointPath32(writer, points[5] / height); // y2
|
|
writeFixedPointPath32(writer, points[4] / width); // x2
|
|
}
|
|
export var booleanOperations = ['exclude', 'combine', 'subtract', 'intersect'];
|
|
export function readVectorMask(reader, vectorMask, width, height, size) {
|
|
var end = reader.offset + size;
|
|
var paths = vectorMask.paths;
|
|
var path = undefined;
|
|
while ((end - reader.offset) >= 26) {
|
|
var selector = readUint16(reader);
|
|
switch (selector) {
|
|
case 0: // Closed subpath length record
|
|
case 3: { // Open subpath length record
|
|
readUint16(reader); // count
|
|
var boolOp = readInt16(reader);
|
|
readUint16(reader); // always 1 ?
|
|
skipBytes(reader, 18);
|
|
// TODO: 'combine' here might be wrong
|
|
path = { open: selector === 3, operation: boolOp === -1 ? 'combine' : booleanOperations[boolOp], knots: [] };
|
|
paths.push(path);
|
|
break;
|
|
}
|
|
case 1: // Closed subpath Bezier knot, linked
|
|
case 2: // Closed subpath Bezier knot, unlinked
|
|
case 4: // Open subpath Bezier knot, linked
|
|
case 5: // Open subpath Bezier knot, unlinked
|
|
path.knots.push({ linked: (selector === 1 || selector === 4), points: readBezierKnot(reader, width, height) });
|
|
break;
|
|
case 6: // Path fill rule record
|
|
skipBytes(reader, 24);
|
|
break;
|
|
case 7: { // Clipboard record
|
|
// TODO: check if these need to be multiplied by document size
|
|
var top_1 = readFixedPointPath32(reader);
|
|
var left = readFixedPointPath32(reader);
|
|
var bottom = readFixedPointPath32(reader);
|
|
var right = readFixedPointPath32(reader);
|
|
var resolution = readFixedPointPath32(reader);
|
|
skipBytes(reader, 4);
|
|
vectorMask.clipboard = { top: top_1, left: left, bottom: bottom, right: right, resolution: resolution };
|
|
break;
|
|
}
|
|
case 8: // Initial fill rule record
|
|
vectorMask.fillStartsWithAllPixels = !!readUint16(reader);
|
|
skipBytes(reader, 22);
|
|
break;
|
|
default: throw new Error('Invalid vmsk section');
|
|
}
|
|
}
|
|
return paths;
|
|
}
|
|
addHandler('vmsk', hasKey('vectorMask'), function (reader, target, left, _a) {
|
|
var width = _a.width, height = _a.height;
|
|
if (readUint32(reader) !== 3)
|
|
throw new Error('Invalid vmsk version');
|
|
target.vectorMask = { paths: [] };
|
|
var vectorMask = target.vectorMask;
|
|
var flags = readUint32(reader);
|
|
vectorMask.invert = (flags & 1) !== 0;
|
|
vectorMask.notLink = (flags & 2) !== 0;
|
|
vectorMask.disable = (flags & 4) !== 0;
|
|
readVectorMask(reader, vectorMask, width, height, left());
|
|
// drawBezierPaths(vectorMask.paths, width, height, 'out.png');
|
|
skipBytes(reader, left());
|
|
}, function (writer, target, _a) {
|
|
var width = _a.width, height = _a.height;
|
|
var vectorMask = target.vectorMask;
|
|
var flags = (vectorMask.invert ? 1 : 0) |
|
|
(vectorMask.notLink ? 2 : 0) |
|
|
(vectorMask.disable ? 4 : 0);
|
|
writeUint32(writer, 3); // version
|
|
writeUint32(writer, flags);
|
|
// initial entry
|
|
writeUint16(writer, 6);
|
|
writeZeros(writer, 24);
|
|
var clipboard = vectorMask.clipboard;
|
|
if (clipboard) {
|
|
writeUint16(writer, 7);
|
|
writeFixedPointPath32(writer, clipboard.top);
|
|
writeFixedPointPath32(writer, clipboard.left);
|
|
writeFixedPointPath32(writer, clipboard.bottom);
|
|
writeFixedPointPath32(writer, clipboard.right);
|
|
writeFixedPointPath32(writer, clipboard.resolution);
|
|
writeZeros(writer, 4);
|
|
}
|
|
if (vectorMask.fillStartsWithAllPixels !== undefined) {
|
|
writeUint16(writer, 8);
|
|
writeUint16(writer, vectorMask.fillStartsWithAllPixels ? 1 : 0);
|
|
writeZeros(writer, 22);
|
|
}
|
|
for (var _i = 0, _b = vectorMask.paths; _i < _b.length; _i++) {
|
|
var path = _b[_i];
|
|
writeUint16(writer, path.open ? 3 : 0);
|
|
writeUint16(writer, path.knots.length);
|
|
writeUint16(writer, Math.abs(booleanOperations.indexOf(path.operation))); // default to 1 if not found
|
|
writeUint16(writer, 1);
|
|
writeZeros(writer, 18); // TODO: these are sometimes non-zero
|
|
var linkedKnot = path.open ? 4 : 1;
|
|
var unlinkedKnot = path.open ? 5 : 2;
|
|
for (var _c = 0, _d = path.knots; _c < _d.length; _c++) {
|
|
var _e = _d[_c], linked = _e.linked, points = _e.points;
|
|
writeUint16(writer, linked ? linkedKnot : unlinkedKnot);
|
|
writeBezierKnot(writer, points, width, height);
|
|
}
|
|
}
|
|
});
|
|
// TODO: need to write vmsk if has outline ?
|
|
addHandlerAlias('vsms', 'vmsk');
|
|
addHandler('vogk', hasKey('vectorOrigination'), function (reader, target, left) {
|
|
if (readInt32(reader) !== 1)
|
|
throw new Error("Invalid vogk version");
|
|
var desc = readVersionAndDescriptor(reader);
|
|
// console.log(require('util').inspect(desc, false, 99, true));
|
|
target.vectorOrigination = { keyDescriptorList: [] };
|
|
for (var _i = 0, _a = desc.keyDescriptorList; _i < _a.length; _i++) {
|
|
var i = _a[_i];
|
|
var item = {};
|
|
if (i.keyShapeInvalidated != null)
|
|
item.keyShapeInvalidated = i.keyShapeInvalidated;
|
|
if (i.keyOriginType != null)
|
|
item.keyOriginType = i.keyOriginType;
|
|
if (i.keyOriginResolution != null)
|
|
item.keyOriginResolution = i.keyOriginResolution;
|
|
if (i.keyOriginShapeBBox) {
|
|
item.keyOriginShapeBoundingBox = {
|
|
top: parseUnits(i.keyOriginShapeBBox['Top ']),
|
|
left: parseUnits(i.keyOriginShapeBBox.Left),
|
|
bottom: parseUnits(i.keyOriginShapeBBox.Btom),
|
|
right: parseUnits(i.keyOriginShapeBBox.Rght),
|
|
};
|
|
}
|
|
var rectRadii = i.keyOriginRRectRadii;
|
|
if (rectRadii) {
|
|
item.keyOriginRRectRadii = {
|
|
topRight: parseUnits(rectRadii.topRight),
|
|
topLeft: parseUnits(rectRadii.topLeft),
|
|
bottomLeft: parseUnits(rectRadii.bottomLeft),
|
|
bottomRight: parseUnits(rectRadii.bottomRight),
|
|
};
|
|
}
|
|
var corners = i.keyOriginBoxCorners;
|
|
if (corners) {
|
|
item.keyOriginBoxCorners = [
|
|
{ x: corners.rectangleCornerA.Hrzn, y: corners.rectangleCornerA.Vrtc },
|
|
{ x: corners.rectangleCornerB.Hrzn, y: corners.rectangleCornerB.Vrtc },
|
|
{ x: corners.rectangleCornerC.Hrzn, y: corners.rectangleCornerC.Vrtc },
|
|
{ x: corners.rectangleCornerD.Hrzn, y: corners.rectangleCornerD.Vrtc },
|
|
];
|
|
}
|
|
var trnf = i.Trnf;
|
|
if (trnf) {
|
|
item.transform = [trnf.xx, trnf.xy, trnf.xy, trnf.yy, trnf.tx, trnf.ty];
|
|
}
|
|
target.vectorOrigination.keyDescriptorList.push(item);
|
|
}
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
target;
|
|
var orig = target.vectorOrigination;
|
|
var desc = { keyDescriptorList: [] };
|
|
for (var i = 0; i < orig.keyDescriptorList.length; i++) {
|
|
var item = orig.keyDescriptorList[i];
|
|
if (item.keyShapeInvalidated) {
|
|
desc.keyDescriptorList.push({ keyShapeInvalidated: true, keyOriginIndex: i });
|
|
}
|
|
else {
|
|
desc.keyDescriptorList.push({}); // we're adding keyOriginIndex at the end
|
|
var out = desc.keyDescriptorList[desc.keyDescriptorList.length - 1];
|
|
if (item.keyOriginType != null)
|
|
out.keyOriginType = item.keyOriginType;
|
|
if (item.keyOriginResolution != null)
|
|
out.keyOriginResolution = item.keyOriginResolution;
|
|
var radii = item.keyOriginRRectRadii;
|
|
if (radii) {
|
|
out.keyOriginRRectRadii = {
|
|
unitValueQuadVersion: 1,
|
|
topRight: unitsValue(radii.topRight, 'topRight'),
|
|
topLeft: unitsValue(radii.topLeft, 'topLeft'),
|
|
bottomLeft: unitsValue(radii.bottomLeft, 'bottomLeft'),
|
|
bottomRight: unitsValue(radii.bottomRight, 'bottomRight'),
|
|
};
|
|
}
|
|
var box = item.keyOriginShapeBoundingBox;
|
|
if (box) {
|
|
out.keyOriginShapeBBox = {
|
|
unitValueQuadVersion: 1,
|
|
'Top ': unitsValue(box.top, 'top'),
|
|
Left: unitsValue(box.left, 'left'),
|
|
Btom: unitsValue(box.bottom, 'bottom'),
|
|
Rght: unitsValue(box.right, 'right'),
|
|
};
|
|
}
|
|
var corners = item.keyOriginBoxCorners;
|
|
if (corners && corners.length === 4) {
|
|
out.keyOriginBoxCorners = {
|
|
rectangleCornerA: { Hrzn: corners[0].x, Vrtc: corners[0].y },
|
|
rectangleCornerB: { Hrzn: corners[1].x, Vrtc: corners[1].y },
|
|
rectangleCornerC: { Hrzn: corners[2].x, Vrtc: corners[2].y },
|
|
rectangleCornerD: { Hrzn: corners[3].x, Vrtc: corners[3].y },
|
|
};
|
|
}
|
|
var transform = item.transform;
|
|
if (transform && transform.length === 6) {
|
|
out.Trnf = {
|
|
xx: transform[0],
|
|
xy: transform[1],
|
|
yx: transform[2],
|
|
yy: transform[3],
|
|
tx: transform[4],
|
|
ty: transform[5],
|
|
};
|
|
}
|
|
out.keyOriginIndex = i;
|
|
}
|
|
}
|
|
writeInt32(writer, 1); // version
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
});
|
|
addHandler('lmfx', function (target) { return target.effects !== undefined && hasMultiEffects(target.effects); }, function (reader, target, left, _, options) {
|
|
var version = readUint32(reader);
|
|
if (version !== 0)
|
|
throw new Error('Invalid lmfx version');
|
|
var desc = readVersionAndDescriptor(reader);
|
|
// console.log(require('util').inspect(info, false, 99, true));
|
|
// discard if read in 'lrFX' or 'lfx2' section
|
|
target.effects = parseEffects(desc, !!options.logMissingFeatures);
|
|
skipBytes(reader, left());
|
|
}, function (writer, target, _, options) {
|
|
var desc = serializeEffects(target.effects, !!options.logMissingFeatures, true);
|
|
writeUint32(writer, 0); // version
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
});
|
|
addHandler('lrFX', hasKey('effects'), function (reader, target, left) {
|
|
if (!target.effects)
|
|
target.effects = readEffects(reader);
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
writeEffects(writer, target.effects);
|
|
});
|
|
addHandler('luni', hasKey('name'), function (reader, target, left) {
|
|
target.name = readUnicodeString(reader);
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
writeUnicodeString(writer, target.name);
|
|
// writeUint16(writer, 0); // padding (but not extending string length)
|
|
});
|
|
addHandler('lnsr', hasKey('nameSource'), function (reader, target) { return target.nameSource = readSignature(reader); }, function (writer, target) { return writeSignature(writer, target.nameSource); });
|
|
addHandler('lyid', hasKey('id'), function (reader, target) { return target.id = readUint32(reader); }, function (writer, target, _psd, options) {
|
|
var id = target.id;
|
|
while (options.layerIds.has(id))
|
|
id += 100; // make sure we don't have duplicate layer ids
|
|
writeUint32(writer, id);
|
|
options.layerIds.add(id);
|
|
options.layerToId.set(target, id);
|
|
});
|
|
addHandler('lsct', hasKey('sectionDivider'), function (reader, target, left) {
|
|
target.sectionDivider = { type: readUint32(reader) };
|
|
if (left()) {
|
|
checkSignature(reader, '8BIM');
|
|
target.sectionDivider.key = readSignature(reader);
|
|
}
|
|
if (left()) {
|
|
target.sectionDivider.subType = readUint32(reader);
|
|
}
|
|
}, function (writer, target) {
|
|
writeUint32(writer, target.sectionDivider.type);
|
|
if (target.sectionDivider.key) {
|
|
writeSignature(writer, '8BIM');
|
|
writeSignature(writer, target.sectionDivider.key);
|
|
if (target.sectionDivider.subType !== undefined) {
|
|
writeUint32(writer, target.sectionDivider.subType);
|
|
}
|
|
}
|
|
});
|
|
// it seems lsdk is used when there's a layer is nested more than 6 levels, but I don't know why?
|
|
// maybe some limitation of old version of PS?
|
|
addHandlerAlias('lsdk', 'lsct');
|
|
addHandler('clbl', hasKey('blendClippendElements'), function (reader, target) {
|
|
target.blendClippendElements = !!readUint8(reader);
|
|
skipBytes(reader, 3);
|
|
}, function (writer, target) {
|
|
writeUint8(writer, target.blendClippendElements ? 1 : 0);
|
|
writeZeros(writer, 3);
|
|
});
|
|
addHandler('infx', hasKey('blendInteriorElements'), function (reader, target) {
|
|
target.blendInteriorElements = !!readUint8(reader);
|
|
skipBytes(reader, 3);
|
|
}, function (writer, target) {
|
|
writeUint8(writer, target.blendInteriorElements ? 1 : 0);
|
|
writeZeros(writer, 3);
|
|
});
|
|
addHandler('knko', hasKey('knockout'), function (reader, target) {
|
|
target.knockout = !!readUint8(reader);
|
|
skipBytes(reader, 3);
|
|
}, function (writer, target) {
|
|
writeUint8(writer, target.knockout ? 1 : 0);
|
|
writeZeros(writer, 3);
|
|
});
|
|
addHandler('lmgm', hasKey('layerMaskAsGlobalMask'), function (reader, target) {
|
|
target.layerMaskAsGlobalMask = !!readUint8(reader);
|
|
skipBytes(reader, 3);
|
|
}, function (writer, target) {
|
|
writeUint8(writer, target.layerMaskAsGlobalMask ? 1 : 0);
|
|
writeZeros(writer, 3);
|
|
});
|
|
addHandler('lspf', hasKey('protected'), function (reader, target) {
|
|
var flags = readUint32(reader);
|
|
target.protected = {
|
|
transparency: (flags & 0x01) !== 0,
|
|
composite: (flags & 0x02) !== 0,
|
|
position: (flags & 0x04) !== 0,
|
|
};
|
|
if (flags & 0x08)
|
|
target.protected.artboards = true;
|
|
}, function (writer, target) {
|
|
var flags = (target.protected.transparency ? 0x01 : 0) |
|
|
(target.protected.composite ? 0x02 : 0) |
|
|
(target.protected.position ? 0x04 : 0) |
|
|
(target.protected.artboards ? 0x08 : 0);
|
|
writeUint32(writer, flags);
|
|
});
|
|
addHandler('lclr', hasKey('layerColor'), function (reader, target) {
|
|
var color = readUint16(reader);
|
|
skipBytes(reader, 6);
|
|
target.layerColor = layerColors[color];
|
|
}, function (writer, target) {
|
|
var index = layerColors.indexOf(target.layerColor);
|
|
writeUint16(writer, index === -1 ? 0 : index);
|
|
writeZeros(writer, 6);
|
|
});
|
|
addHandler('shmd', function (target) { return target.timestamp !== undefined || target.animationFrames !== undefined ||
|
|
target.animationFrameFlags !== undefined || target.timeline !== undefined; }, function (reader, target, left, _, options) {
|
|
var count = readUint32(reader);
|
|
var _loop_1 = function (i) {
|
|
checkSignature(reader, '8BIM');
|
|
var key = readSignature(reader);
|
|
readUint8(reader); // copy
|
|
skipBytes(reader, 3);
|
|
readSection(reader, 1, function (left) {
|
|
if (key === 'cust') {
|
|
var desc = readVersionAndDescriptor(reader);
|
|
// console.log('cust', target.name, require('util').inspect(desc, false, 99, true));
|
|
if (desc.layerTime !== undefined)
|
|
target.timestamp = desc.layerTime;
|
|
}
|
|
else if (key === 'mlst') {
|
|
var desc = readVersionAndDescriptor(reader);
|
|
// console.log('mlst', target.name, require('util').inspect(desc, false, 99, true));
|
|
target.animationFrames = [];
|
|
for (var i_1 = 0; i_1 < desc.LaSt.length; i_1++) {
|
|
var f = desc.LaSt[i_1];
|
|
var frame = { frames: f.FrLs };
|
|
if (f.enab !== undefined)
|
|
frame.enable = f.enab;
|
|
if (f.Ofst)
|
|
frame.offset = horzVrtcToXY(f.Ofst);
|
|
if (f.FXRf)
|
|
frame.referencePoint = horzVrtcToXY(f.FXRf);
|
|
if (f.Lefx)
|
|
frame.effects = parseEffects(f.Lefx, !!options.logMissingFeatures);
|
|
if (f.blendOptions && f.blendOptions.Opct)
|
|
frame.opacity = parsePercent(f.blendOptions.Opct);
|
|
target.animationFrames.push(frame);
|
|
}
|
|
}
|
|
else if (key === 'mdyn') {
|
|
// frame flags
|
|
readUint16(reader); // unknown
|
|
var propagate = readUint8(reader);
|
|
var flags = readUint8(reader);
|
|
target.animationFrameFlags = {
|
|
propagateFrameOne: !propagate,
|
|
unifyLayerPosition: (flags & 1) !== 0,
|
|
unifyLayerStyle: (flags & 2) !== 0,
|
|
unifyLayerVisibility: (flags & 4) !== 0,
|
|
};
|
|
}
|
|
else if (key === 'tmln') {
|
|
var desc = readVersionAndDescriptor(reader);
|
|
var timeScope = desc.timeScope;
|
|
// console.log('tmln', target.name, target.id, require('util').inspect(desc, false, 99, true));
|
|
var timeline = {
|
|
start: timeScope.Strt,
|
|
duration: timeScope.duration,
|
|
inTime: timeScope.inTime,
|
|
outTime: timeScope.outTime,
|
|
autoScope: desc.autoScope,
|
|
audioLevel: desc.audioLevel,
|
|
};
|
|
if (desc.trackList) {
|
|
timeline.tracks = parseTrackList(desc.trackList, !!options.logMissingFeatures);
|
|
}
|
|
target.timeline = timeline;
|
|
// console.log('tmln:result', target.name, target.id, require('util').inspect(timeline, false, 99, true));
|
|
}
|
|
else {
|
|
options.logDevFeatures && console.log('Unhandled "shmd" section key', key);
|
|
}
|
|
skipBytes(reader, left());
|
|
});
|
|
};
|
|
for (var i = 0; i < count; i++) {
|
|
_loop_1(i);
|
|
}
|
|
skipBytes(reader, left());
|
|
}, function (writer, target, _, options) {
|
|
var animationFrames = target.animationFrames, animationFrameFlags = target.animationFrameFlags, timestamp = target.timestamp, timeline = target.timeline;
|
|
var count = 0;
|
|
if (animationFrames)
|
|
count++;
|
|
if (animationFrameFlags)
|
|
count++;
|
|
if (timeline)
|
|
count++;
|
|
if (timestamp !== undefined)
|
|
count++;
|
|
writeUint32(writer, count);
|
|
if (animationFrames) {
|
|
writeSignature(writer, '8BIM');
|
|
writeSignature(writer, 'mlst');
|
|
writeUint8(writer, 0); // copy (always false)
|
|
writeZeros(writer, 3);
|
|
writeSection(writer, 2, function () {
|
|
var _a;
|
|
var desc = {
|
|
LaID: (_a = target.id) !== null && _a !== void 0 ? _a : 0,
|
|
LaSt: [],
|
|
};
|
|
for (var i = 0; i < animationFrames.length; i++) {
|
|
var f = animationFrames[i];
|
|
var frame = {};
|
|
if (f.enable !== undefined)
|
|
frame.enab = f.enable;
|
|
frame.FrLs = f.frames;
|
|
if (f.offset)
|
|
frame.Ofst = xyToHorzVrtc(f.offset);
|
|
if (f.referencePoint)
|
|
frame.FXRf = xyToHorzVrtc(f.referencePoint);
|
|
if (f.effects)
|
|
frame.Lefx = serializeEffects(f.effects, false, false);
|
|
if (f.opacity !== undefined)
|
|
frame.blendOptions = { Opct: unitsPercent(f.opacity) };
|
|
desc.LaSt.push(frame);
|
|
}
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
}, true);
|
|
}
|
|
if (animationFrameFlags) {
|
|
writeSignature(writer, '8BIM');
|
|
writeSignature(writer, 'mdyn');
|
|
writeUint8(writer, 0); // copy (always false)
|
|
writeZeros(writer, 3);
|
|
writeSection(writer, 2, function () {
|
|
writeUint16(writer, 0); // unknown
|
|
writeUint8(writer, animationFrameFlags.propagateFrameOne ? 0x0 : 0xf);
|
|
writeUint8(writer, (animationFrameFlags.unifyLayerPosition ? 1 : 0) |
|
|
(animationFrameFlags.unifyLayerStyle ? 2 : 0) |
|
|
(animationFrameFlags.unifyLayerVisibility ? 4 : 0));
|
|
});
|
|
}
|
|
if (timeline) {
|
|
writeSignature(writer, '8BIM');
|
|
writeSignature(writer, 'tmln');
|
|
writeUint8(writer, 0); // copy (always false)
|
|
writeZeros(writer, 3);
|
|
writeSection(writer, 2, function () {
|
|
var desc = {
|
|
Vrsn: 1,
|
|
timeScope: {
|
|
Vrsn: 1,
|
|
Strt: timeline.start,
|
|
duration: timeline.duration,
|
|
inTime: timeline.inTime,
|
|
outTime: timeline.outTime,
|
|
},
|
|
autoScope: timeline.autoScope,
|
|
audioLevel: timeline.audioLevel,
|
|
};
|
|
if (timeline.tracks) {
|
|
desc.trackList = serializeTrackList(timeline.tracks);
|
|
}
|
|
var id = options.layerToId.get(target) || target.id || 0;
|
|
if (!id)
|
|
throw new Error('You need to provide layer.id value whan writing document with animations');
|
|
desc.LyrI = id;
|
|
// console.log('WRITE:tmln', target.name, target.id, require('util').inspect(desc, false, 99, true));
|
|
writeVersionAndDescriptor(writer, '', 'null', desc, 'anim');
|
|
}, true);
|
|
}
|
|
if (timestamp !== undefined) {
|
|
writeSignature(writer, '8BIM');
|
|
writeSignature(writer, 'cust');
|
|
writeUint8(writer, 0); // copy (always false)
|
|
writeZeros(writer, 3);
|
|
writeSection(writer, 2, function () {
|
|
var desc = {
|
|
layerTime: timestamp,
|
|
};
|
|
writeVersionAndDescriptor(writer, '', 'metadata', desc);
|
|
}, true);
|
|
}
|
|
});
|
|
addHandler('vstk', hasKey('vectorStroke'), function (reader, target, left) {
|
|
var desc = readVersionAndDescriptor(reader);
|
|
// console.log(require('util').inspect(desc, false, 99, true));
|
|
target.vectorStroke = {
|
|
strokeEnabled: desc.strokeEnabled,
|
|
fillEnabled: desc.fillEnabled,
|
|
lineWidth: parseUnits(desc.strokeStyleLineWidth),
|
|
lineDashOffset: parseUnits(desc.strokeStyleLineDashOffset),
|
|
miterLimit: desc.strokeStyleMiterLimit,
|
|
lineCapType: strokeStyleLineCapType.decode(desc.strokeStyleLineCapType),
|
|
lineJoinType: strokeStyleLineJoinType.decode(desc.strokeStyleLineJoinType),
|
|
lineAlignment: strokeStyleLineAlignment.decode(desc.strokeStyleLineAlignment),
|
|
scaleLock: desc.strokeStyleScaleLock,
|
|
strokeAdjust: desc.strokeStyleStrokeAdjust,
|
|
lineDashSet: desc.strokeStyleLineDashSet.map(parseUnits),
|
|
blendMode: BlnM.decode(desc.strokeStyleBlendMode),
|
|
opacity: parsePercent(desc.strokeStyleOpacity),
|
|
content: parseVectorContent(desc.strokeStyleContent),
|
|
resolution: desc.strokeStyleResolution,
|
|
};
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var _a, _b, _c;
|
|
var stroke = target.vectorStroke;
|
|
var descriptor = {
|
|
strokeStyleVersion: 2,
|
|
strokeEnabled: !!stroke.strokeEnabled,
|
|
fillEnabled: !!stroke.fillEnabled,
|
|
strokeStyleLineWidth: stroke.lineWidth || { value: 3, units: 'Points' },
|
|
strokeStyleLineDashOffset: stroke.lineDashOffset || { value: 0, units: 'Points' },
|
|
strokeStyleMiterLimit: (_a = stroke.miterLimit) !== null && _a !== void 0 ? _a : 100,
|
|
strokeStyleLineCapType: strokeStyleLineCapType.encode(stroke.lineCapType),
|
|
strokeStyleLineJoinType: strokeStyleLineJoinType.encode(stroke.lineJoinType),
|
|
strokeStyleLineAlignment: strokeStyleLineAlignment.encode(stroke.lineAlignment),
|
|
strokeStyleScaleLock: !!stroke.scaleLock,
|
|
strokeStyleStrokeAdjust: !!stroke.strokeAdjust,
|
|
strokeStyleLineDashSet: stroke.lineDashSet || [],
|
|
strokeStyleBlendMode: BlnM.encode(stroke.blendMode),
|
|
strokeStyleOpacity: unitsPercent((_b = stroke.opacity) !== null && _b !== void 0 ? _b : 1),
|
|
strokeStyleContent: serializeVectorContent(stroke.content || { type: 'color', color: { r: 0, g: 0, b: 0 } }).descriptor,
|
|
strokeStyleResolution: (_c = stroke.resolution) !== null && _c !== void 0 ? _c : 72,
|
|
};
|
|
writeVersionAndDescriptor(writer, '', 'strokeStyle', descriptor);
|
|
});
|
|
addHandler('artb', // per-layer arboard info
|
|
hasKey('artboard'), function (reader, target, left) {
|
|
var desc = readVersionAndDescriptor(reader);
|
|
var rect = desc.artboardRect;
|
|
target.artboard = {
|
|
rect: { top: rect['Top '], left: rect.Left, bottom: rect.Btom, right: rect.Rght },
|
|
guideIndices: desc.guideIndeces,
|
|
presetName: desc.artboardPresetName,
|
|
color: parseColor(desc['Clr ']),
|
|
backgroundType: desc.artboardBackgroundType,
|
|
};
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var _a;
|
|
var artboard = target.artboard;
|
|
var rect = artboard.rect;
|
|
var desc = {
|
|
artboardRect: { 'Top ': rect.top, Left: rect.left, Btom: rect.bottom, Rght: rect.right },
|
|
guideIndeces: artboard.guideIndices || [],
|
|
artboardPresetName: artboard.presetName || '',
|
|
'Clr ': serializeColor(artboard.color),
|
|
artboardBackgroundType: (_a = artboard.backgroundType) !== null && _a !== void 0 ? _a : 1,
|
|
};
|
|
writeVersionAndDescriptor(writer, '', 'artboard', desc);
|
|
});
|
|
addHandler('sn2P', hasKey('usingAlignedRendering'), function (reader, target) { return target.usingAlignedRendering = !!readUint32(reader); }, function (writer, target) { return writeUint32(writer, target.usingAlignedRendering ? 1 : 0); });
|
|
var placedLayerTypes = ['unknown', 'vector', 'raster', 'image stack'];
|
|
function parseWarp(warp) {
|
|
var _a, _b, _c, _d, _e, _f;
|
|
var result = {
|
|
style: warpStyle.decode(warp.warpStyle),
|
|
value: warp.warpValue || 0,
|
|
perspective: warp.warpPerspective || 0,
|
|
perspectiveOther: warp.warpPerspectiveOther || 0,
|
|
rotate: Ornt.decode(warp.warpRotate),
|
|
bounds: warp.bounds && {
|
|
top: parseUnitsOrNumber(warp.bounds['Top ']),
|
|
left: parseUnitsOrNumber(warp.bounds.Left),
|
|
bottom: parseUnitsOrNumber(warp.bounds.Btom),
|
|
right: parseUnitsOrNumber(warp.bounds.Rght),
|
|
},
|
|
uOrder: warp.uOrder,
|
|
vOrder: warp.vOrder,
|
|
};
|
|
if (warp.deformNumRows != null || warp.deformNumCols != null) {
|
|
result.deformNumRows = warp.deformNumRows;
|
|
result.deformNumCols = warp.deformNumCols;
|
|
}
|
|
var envelopeWarp = warp.customEnvelopeWarp;
|
|
if (envelopeWarp) {
|
|
result.customEnvelopeWarp = {
|
|
meshPoints: [],
|
|
};
|
|
var xs = ((_a = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Hrzn'; })) === null || _a === void 0 ? void 0 : _a.values) || [];
|
|
var ys = ((_b = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Vrtc'; })) === null || _b === void 0 ? void 0 : _b.values) || [];
|
|
for (var i = 0; i < xs.length; i++) {
|
|
result.customEnvelopeWarp.meshPoints.push({ x: xs[i], y: ys[i] });
|
|
}
|
|
if (envelopeWarp.quiltSliceX || envelopeWarp.quiltSliceY) {
|
|
result.customEnvelopeWarp.quiltSliceX = ((_d = (_c = envelopeWarp.quiltSliceX) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.values) || [];
|
|
result.customEnvelopeWarp.quiltSliceY = ((_f = (_e = envelopeWarp.quiltSliceY) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.values) || [];
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
function isQuiltWarp(warp) {
|
|
var _a, _b;
|
|
return warp.deformNumCols != null || warp.deformNumRows != null ||
|
|
((_a = warp.customEnvelopeWarp) === null || _a === void 0 ? void 0 : _a.quiltSliceX) || ((_b = warp.customEnvelopeWarp) === null || _b === void 0 ? void 0 : _b.quiltSliceY);
|
|
}
|
|
function encodeWarp(warp) {
|
|
var bounds = warp.bounds;
|
|
var desc = {
|
|
warpStyle: warpStyle.encode(warp.style),
|
|
warpValue: warp.value || 0,
|
|
warpPerspective: warp.perspective || 0,
|
|
warpPerspectiveOther: warp.perspectiveOther || 0,
|
|
warpRotate: Ornt.encode(warp.rotate),
|
|
bounds: {
|
|
'Top ': unitsValue(bounds && bounds.top || { units: 'Pixels', value: 0 }, 'bounds.top'),
|
|
Left: unitsValue(bounds && bounds.left || { units: 'Pixels', value: 0 }, 'bounds.left'),
|
|
Btom: unitsValue(bounds && bounds.bottom || { units: 'Pixels', value: 0 }, 'bounds.bottom'),
|
|
Rght: unitsValue(bounds && bounds.right || { units: 'Pixels', value: 0 }, 'bounds.right'),
|
|
},
|
|
uOrder: warp.uOrder || 0,
|
|
vOrder: warp.vOrder || 0,
|
|
};
|
|
var isQuilt = isQuiltWarp(warp);
|
|
if (isQuilt) {
|
|
var desc2 = desc;
|
|
desc2.deformNumRows = warp.deformNumRows || 0;
|
|
desc2.deformNumCols = warp.deformNumCols || 0;
|
|
}
|
|
var customEnvelopeWarp = warp.customEnvelopeWarp;
|
|
if (customEnvelopeWarp) {
|
|
var meshPoints = customEnvelopeWarp.meshPoints || [];
|
|
if (isQuilt) {
|
|
var desc2 = desc;
|
|
desc2.customEnvelopeWarp = {
|
|
quiltSliceX: [{
|
|
type: 'quiltSliceX',
|
|
values: customEnvelopeWarp.quiltSliceX || [],
|
|
}],
|
|
quiltSliceY: [{
|
|
type: 'quiltSliceY',
|
|
values: customEnvelopeWarp.quiltSliceY || [],
|
|
}],
|
|
meshPoints: [
|
|
{ type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) },
|
|
{ type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) },
|
|
],
|
|
};
|
|
}
|
|
else {
|
|
desc.customEnvelopeWarp = {
|
|
meshPoints: [
|
|
{ type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) },
|
|
{ type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) },
|
|
],
|
|
};
|
|
}
|
|
}
|
|
return desc;
|
|
}
|
|
addHandler('PlLd', hasKey('placedLayer'), function (reader, target, left) {
|
|
if (readSignature(reader) !== 'plcL')
|
|
throw new Error("Invalid PlLd signature");
|
|
if (readInt32(reader) !== 3)
|
|
throw new Error("Invalid PlLd version");
|
|
var id = readPascalString(reader, 1);
|
|
var pageNumber = readInt32(reader);
|
|
var totalPages = readInt32(reader); // TODO: check how this works ?
|
|
readInt32(reader); // anitAliasPolicy 16
|
|
var placedLayerType = readInt32(reader); // 0 = unknown, 1 = vector, 2 = raster, 3 = image stack
|
|
if (!placedLayerTypes[placedLayerType])
|
|
throw new Error('Invalid PlLd type');
|
|
var transform = [];
|
|
for (var i = 0; i < 8; i++)
|
|
transform.push(readFloat64(reader)); // x, y of 4 corners of the transform
|
|
var warpVersion = readInt32(reader);
|
|
if (warpVersion !== 0)
|
|
throw new Error("Invalid Warp version ".concat(warpVersion));
|
|
var warp = readVersionAndDescriptor(reader);
|
|
target.placedLayer = target.placedLayer || {
|
|
id: id,
|
|
type: placedLayerTypes[placedLayerType],
|
|
pageNumber: pageNumber,
|
|
totalPages: totalPages,
|
|
transform: transform,
|
|
warp: parseWarp(warp),
|
|
};
|
|
// console.log('PlLd warp', require('util').inspect(warp, false, 99, true));
|
|
// console.log('PlLd', require('util').inspect(target.placedLayer, false, 99, true));
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var placed = target.placedLayer;
|
|
writeSignature(writer, 'plcL');
|
|
writeInt32(writer, 3); // version
|
|
writePascalString(writer, placed.id, 1);
|
|
writeInt32(writer, 1); // pageNumber
|
|
writeInt32(writer, 1); // totalPages
|
|
writeInt32(writer, 16); // anitAliasPolicy
|
|
if (placedLayerTypes.indexOf(placed.type) === -1)
|
|
throw new Error('Invalid placedLayer type');
|
|
writeInt32(writer, placedLayerTypes.indexOf(placed.type));
|
|
for (var i = 0; i < 8; i++)
|
|
writeFloat64(writer, placed.transform[i]);
|
|
writeInt32(writer, 0); // warp version
|
|
var isQuilt = placed.warp && isQuiltWarp(placed.warp);
|
|
var type = isQuilt ? 'quiltWarp' : 'warp';
|
|
writeVersionAndDescriptor(writer, '', type, encodeWarp(placed.warp || {}), type);
|
|
});
|
|
addHandler('SoLd', hasKey('placedLayer'), function (reader, target, left) {
|
|
if (readSignature(reader) !== 'soLD')
|
|
throw new Error("Invalid SoLd type");
|
|
if (readInt32(reader) !== 4)
|
|
throw new Error("Invalid SoLd version");
|
|
var desc = readVersionAndDescriptor(reader);
|
|
// console.log('SoLd', require('util').inspect(desc, false, 99, true));
|
|
// console.log('SoLd.warp', require('util').inspect(desc.warp, false, 99, true));
|
|
// console.log('SoLd.quiltWarp', require('util').inspect(desc.quiltWarp, false, 99, true));
|
|
target.placedLayer = {
|
|
id: desc.Idnt,
|
|
placed: desc.placed,
|
|
type: placedLayerTypes[desc.Type],
|
|
pageNumber: desc.PgNm,
|
|
totalPages: desc.totalPages,
|
|
frameStep: desc.frameStep,
|
|
duration: desc.duration,
|
|
frameCount: desc.frameCount,
|
|
transform: desc.Trnf,
|
|
width: desc['Sz '].Wdth,
|
|
height: desc['Sz '].Hght,
|
|
resolution: parseUnits(desc.Rslt),
|
|
warp: parseWarp((desc.quiltWarp || desc.warp)),
|
|
};
|
|
if (desc.nonAffineTransform && desc.nonAffineTransform.some(function (x, i) { return x !== desc.Trnf[i]; })) {
|
|
target.placedLayer.nonAffineTransform = desc.nonAffineTransform;
|
|
}
|
|
if (desc.Crop)
|
|
target.placedLayer.crop = desc.Crop;
|
|
if (desc.comp)
|
|
target.placedLayer.comp = desc.comp;
|
|
if (desc.compInfo)
|
|
target.placedLayer.compInfo = desc.compInfo;
|
|
skipBytes(reader, left()); // HACK
|
|
}, function (writer, target) {
|
|
var _a, _b;
|
|
writeSignature(writer, 'soLD');
|
|
writeInt32(writer, 4); // version
|
|
var placed = target.placedLayer;
|
|
var desc = __assign(__assign({ Idnt: placed.id, placed: (_a = placed.placed) !== null && _a !== void 0 ? _a : placed.id, PgNm: placed.pageNumber || 1, totalPages: placed.totalPages || 1 }, (placed.crop ? { Crop: placed.crop } : {})), { frameStep: placed.frameStep || { numerator: 0, denominator: 600 }, duration: placed.duration || { numerator: 0, denominator: 600 }, frameCount: placed.frameCount || 0, Annt: 16, Type: placedLayerTypes.indexOf(placed.type), Trnf: placed.transform, nonAffineTransform: (_b = placed.nonAffineTransform) !== null && _b !== void 0 ? _b : placed.transform, quiltWarp: {}, warp: encodeWarp(placed.warp || {}), 'Sz ': {
|
|
Wdth: placed.width || 0,
|
|
Hght: placed.height || 0, // TODO: find size ?
|
|
}, Rslt: placed.resolution ? unitsValue(placed.resolution, 'resolution') : { units: 'Density', value: 72 } });
|
|
if (placed.warp && isQuiltWarp(placed.warp)) {
|
|
var quiltWarp = encodeWarp(placed.warp);
|
|
desc.quiltWarp = quiltWarp;
|
|
desc.warp = {
|
|
warpStyle: 'warpStyle.warpNone',
|
|
warpValue: quiltWarp.warpValue,
|
|
warpPerspective: quiltWarp.warpPerspective,
|
|
warpPerspectiveOther: quiltWarp.warpPerspectiveOther,
|
|
warpRotate: quiltWarp.warpRotate,
|
|
bounds: quiltWarp.bounds,
|
|
uOrder: quiltWarp.uOrder,
|
|
vOrder: quiltWarp.vOrder,
|
|
};
|
|
}
|
|
else {
|
|
delete desc.quiltWarp;
|
|
}
|
|
if (placed.comp)
|
|
desc.comp = placed.comp;
|
|
if (placed.compInfo)
|
|
desc.compInfo = placed.compInfo;
|
|
writeVersionAndDescriptor(writer, '', 'null', desc, desc.quiltWarp ? 'quiltWarp' : 'warp');
|
|
});
|
|
addHandler('fxrp', hasKey('referencePoint'), function (reader, target) {
|
|
target.referencePoint = {
|
|
x: readFloat64(reader),
|
|
y: readFloat64(reader),
|
|
};
|
|
}, function (writer, target) {
|
|
writeFloat64(writer, target.referencePoint.x);
|
|
writeFloat64(writer, target.referencePoint.y);
|
|
});
|
|
if (MOCK_HANDLERS) {
|
|
addHandler('Patt', function (target) { return target._Patt !== undefined; }, function (reader, target, left) {
|
|
// console.log('additional info: Patt');
|
|
target._Patt = readBytes(reader, left());
|
|
}, function (writer, target) { return false && writeBytes(writer, target._Patt); });
|
|
}
|
|
else {
|
|
addHandler('Patt', // TODO: handle also Pat2 & Pat3
|
|
function (// TODO: handle also Pat2 & Pat3
|
|
target) { return !target; }, function (reader, target, left) {
|
|
if (!left())
|
|
return;
|
|
skipBytes(reader, left());
|
|
return; // not supported yet
|
|
target;
|
|
readPattern;
|
|
// if (!target.patterns) target.patterns = [];
|
|
// target.patterns.push(readPattern(reader));
|
|
// skipBytes(reader, left());
|
|
}, function (_writer, _target) {
|
|
});
|
|
}
|
|
function readRect(reader) {
|
|
var top = readInt32(reader);
|
|
var left = readInt32(reader);
|
|
var bottom = readInt32(reader);
|
|
var right = readInt32(reader);
|
|
return { top: top, left: left, bottom: bottom, right: right };
|
|
}
|
|
function writeRect(writer, rect) {
|
|
writeInt32(writer, rect.top);
|
|
writeInt32(writer, rect.left);
|
|
writeInt32(writer, rect.bottom);
|
|
writeInt32(writer, rect.right);
|
|
}
|
|
addHandler('Anno', function (target) { return target.annotations !== undefined; }, function (reader, target, left) {
|
|
var major = readUint16(reader);
|
|
var minor = readUint16(reader);
|
|
if (major !== 2 || minor !== 1)
|
|
throw new Error('Invalid Anno version');
|
|
var count = readUint32(reader);
|
|
var annotations = [];
|
|
for (var i = 0; i < count; i++) {
|
|
/*const length =*/ readUint32(reader);
|
|
var type = readSignature(reader);
|
|
var open_1 = !!readUint8(reader);
|
|
/*const flags =*/ readUint8(reader); // always 28
|
|
/*const optionalBlocks =*/ readUint16(reader);
|
|
var iconLocation = readRect(reader);
|
|
var popupLocation = readRect(reader);
|
|
var color = readColor(reader);
|
|
var author = readPascalString(reader, 2);
|
|
var name_1 = readPascalString(reader, 2);
|
|
var date = readPascalString(reader, 2);
|
|
/*const contentLength =*/ readUint32(reader);
|
|
/*const dataType =*/ readSignature(reader);
|
|
var dataLength = readUint32(reader);
|
|
var data = void 0;
|
|
if (type === 'txtA') {
|
|
if (dataLength >= 2 && readUint16(reader) === 0xfeff) {
|
|
data = readUnicodeStringWithLength(reader, (dataLength - 2) / 2);
|
|
}
|
|
else {
|
|
reader.offset -= 2;
|
|
data = readAsciiString(reader, dataLength);
|
|
}
|
|
data = data.replace(/\r/g, '\n');
|
|
}
|
|
else if (type === 'sndA') {
|
|
data = readBytes(reader, dataLength);
|
|
}
|
|
else {
|
|
throw new Error('Unknown annotation type');
|
|
}
|
|
annotations.push({
|
|
type: type === 'txtA' ? 'text' : 'sound',
|
|
open: open_1,
|
|
iconLocation: iconLocation,
|
|
popupLocation: popupLocation,
|
|
color: color,
|
|
author: author,
|
|
name: name_1,
|
|
date: date,
|
|
data: data,
|
|
});
|
|
}
|
|
target.annotations = annotations;
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var annotations = target.annotations;
|
|
writeUint16(writer, 2);
|
|
writeUint16(writer, 1);
|
|
writeUint32(writer, annotations.length);
|
|
for (var _i = 0, annotations_1 = annotations; _i < annotations_1.length; _i++) {
|
|
var annotation = annotations_1[_i];
|
|
var sound = annotation.type === 'sound';
|
|
if (sound && !(annotation.data instanceof Uint8Array))
|
|
throw new Error('Sound annotation data should be Uint8Array');
|
|
if (!sound && typeof annotation.data !== 'string')
|
|
throw new Error('Text annotation data should be string');
|
|
var lengthOffset = writer.offset;
|
|
writeUint32(writer, 0); // length
|
|
writeSignature(writer, sound ? 'sndA' : 'txtA');
|
|
writeUint8(writer, annotation.open ? 1 : 0);
|
|
writeUint8(writer, 28);
|
|
writeUint16(writer, 1);
|
|
writeRect(writer, annotation.iconLocation);
|
|
writeRect(writer, annotation.popupLocation);
|
|
writeColor(writer, annotation.color);
|
|
writePascalString(writer, annotation.author || '', 2);
|
|
writePascalString(writer, annotation.name || '', 2);
|
|
writePascalString(writer, annotation.date || '', 2);
|
|
var contentOffset = writer.offset;
|
|
writeUint32(writer, 0); // content length
|
|
writeSignature(writer, sound ? 'sndM' : 'txtC');
|
|
writeUint32(writer, 0); // data length
|
|
var dataOffset = writer.offset;
|
|
if (sound) {
|
|
writeBytes(writer, annotation.data);
|
|
}
|
|
else {
|
|
writeUint16(writer, 0xfeff); // unicode string indicator
|
|
var text = annotation.data.replace(/\n/g, '\r');
|
|
for (var i = 0; i < text.length; i++)
|
|
writeUint16(writer, text.charCodeAt(i));
|
|
}
|
|
writer.view.setUint32(lengthOffset, writer.offset - lengthOffset, false);
|
|
writer.view.setUint32(contentOffset, writer.offset - contentOffset, false);
|
|
writer.view.setUint32(dataOffset - 4, writer.offset - dataOffset, false);
|
|
}
|
|
});
|
|
addHandler('lnk2', function (target) { return !!target.linkedFiles && target.linkedFiles.length > 0; }, function (reader, target, left, _, options) {
|
|
var psd = target;
|
|
psd.linkedFiles = [];
|
|
while (left() > 8) {
|
|
var size = readLength64(reader); // size
|
|
var startOffset = reader.offset;
|
|
var type = readSignature(reader);
|
|
var version = readInt32(reader);
|
|
var id = readPascalString(reader, 1);
|
|
var name_2 = readUnicodeString(reader);
|
|
var fileType = readSignature(reader).trim(); // ' ' if empty
|
|
var fileCreator = readSignature(reader).trim(); // ' ' or '\0\0\0\0' if empty
|
|
var dataSize = readLength64(reader);
|
|
var hasFileOpenDescriptor = readUint8(reader);
|
|
var fileOpenDescriptor = hasFileOpenDescriptor ? readVersionAndDescriptor(reader) : undefined;
|
|
var linkedFileDescriptor = type === 'liFE' ? readVersionAndDescriptor(reader) : undefined;
|
|
var file = { id: id, name: name_2, data: undefined };
|
|
if (fileType)
|
|
file.type = fileType;
|
|
if (fileCreator)
|
|
file.creator = fileCreator;
|
|
if (fileOpenDescriptor)
|
|
file.descriptor = fileOpenDescriptor;
|
|
if (type === 'liFE' && version > 3) {
|
|
var year = readInt32(reader);
|
|
var month = readUint8(reader);
|
|
var day = readUint8(reader);
|
|
var hour = readUint8(reader);
|
|
var minute = readUint8(reader);
|
|
var seconds = readFloat64(reader);
|
|
var wholeSeconds = Math.floor(seconds);
|
|
var ms = (seconds - wholeSeconds) * 1000;
|
|
file.time = new Date(year, month, day, hour, minute, wholeSeconds, ms);
|
|
}
|
|
var fileSize = type === 'liFE' ? readLength64(reader) : 0;
|
|
if (type === 'liFA')
|
|
skipBytes(reader, 8);
|
|
if (type === 'liFD')
|
|
file.data = readBytes(reader, dataSize);
|
|
if (version >= 5)
|
|
file.childDocumentID = readUnicodeString(reader);
|
|
if (version >= 6)
|
|
file.assetModTime = readFloat64(reader);
|
|
if (version >= 7)
|
|
file.assetLockedState = readUint8(reader);
|
|
if (type === 'liFE')
|
|
file.data = readBytes(reader, fileSize);
|
|
if (options.skipLinkedFilesData)
|
|
file.data = undefined;
|
|
psd.linkedFiles.push(file);
|
|
linkedFileDescriptor;
|
|
while (size % 4)
|
|
size++;
|
|
reader.offset = startOffset + size;
|
|
}
|
|
skipBytes(reader, left()); // ?
|
|
}, function (writer, target) {
|
|
var psd = target;
|
|
for (var _i = 0, _a = psd.linkedFiles; _i < _a.length; _i++) {
|
|
var file = _a[_i];
|
|
var version = 2;
|
|
if (file.assetLockedState != null)
|
|
version = 7;
|
|
else if (file.assetModTime != null)
|
|
version = 6;
|
|
else if (file.childDocumentID != null)
|
|
version = 5;
|
|
// TODO: else if (file.time != null) version = 3; (only for liFE)
|
|
writeUint32(writer, 0);
|
|
writeUint32(writer, 0); // size
|
|
var sizeOffset = writer.offset;
|
|
writeSignature(writer, file.data ? 'liFD' : 'liFA');
|
|
writeInt32(writer, version);
|
|
writePascalString(writer, file.id || '', 1);
|
|
writeUnicodeStringWithPadding(writer, file.name || '');
|
|
writeSignature(writer, file.type ? "".concat(file.type, " ").substring(0, 4) : ' ');
|
|
writeSignature(writer, file.creator ? "".concat(file.creator, " ").substring(0, 4) : '\0\0\0\0');
|
|
writeLength64(writer, file.data ? file.data.byteLength : 0);
|
|
if (file.descriptor && file.descriptor.compInfo) {
|
|
var desc = {
|
|
compInfo: file.descriptor.compInfo,
|
|
};
|
|
writeUint8(writer, 1);
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
}
|
|
else {
|
|
writeUint8(writer, 0);
|
|
}
|
|
if (file.data)
|
|
writeBytes(writer, file.data);
|
|
else
|
|
writeLength64(writer, 0);
|
|
if (version >= 5)
|
|
writeUnicodeStringWithPadding(writer, file.childDocumentID || '');
|
|
if (version >= 6)
|
|
writeFloat64(writer, file.assetModTime || 0);
|
|
if (version >= 7)
|
|
writeUint8(writer, file.assetLockedState || 0);
|
|
var size = writer.offset - sizeOffset;
|
|
writer.view.setUint32(sizeOffset - 4, size, false); // write size
|
|
while (size % 4) {
|
|
size++;
|
|
writeUint8(writer, 0);
|
|
}
|
|
}
|
|
});
|
|
addHandlerAlias('lnkD', 'lnk2');
|
|
addHandlerAlias('lnk3', 'lnk2');
|
|
// this seems to just be zero size block, ignore it
|
|
addHandler('lnkE', function (target) { return target._lnkE !== undefined; }, function (reader, target, left, _psds, options) {
|
|
if (options.logMissingFeatures && left()) {
|
|
console.log("Non-empty lnkE layer info (".concat(left(), " bytes)"));
|
|
}
|
|
if (MOCK_HANDLERS) {
|
|
target._lnkE = readBytes(reader, left());
|
|
}
|
|
}, function (writer, target) { return MOCK_HANDLERS && writeBytes(writer, target._lnkE); });
|
|
addHandler('pths', hasKey('pathList'), function (reader, target) {
|
|
var descriptor = readVersionAndDescriptor(reader);
|
|
target.pathList = []; // TODO: read paths (find example with non-empty list)
|
|
descriptor;
|
|
// console.log('pths', descriptor); // TODO: remove this
|
|
}, function (writer, _target) {
|
|
var descriptor = {
|
|
pathList: [], // TODO: write paths
|
|
};
|
|
writeVersionAndDescriptor(writer, '', 'pathsDataClass', descriptor);
|
|
});
|
|
addHandler('lyvr', hasKey('version'), function (reader, target) { return target.version = readUint32(reader); }, function (writer, target) { return writeUint32(writer, target.version); });
|
|
function adjustmentType(type) {
|
|
return function (target) { return !!target.adjustment && target.adjustment.type === type; };
|
|
}
|
|
addHandler('brit', adjustmentType('brightness/contrast'), function (reader, target, left) {
|
|
if (!target.adjustment) { // ignore if got one from CgEd block
|
|
target.adjustment = {
|
|
type: 'brightness/contrast',
|
|
brightness: readInt16(reader),
|
|
contrast: readInt16(reader),
|
|
meanValue: readInt16(reader),
|
|
labColorOnly: !!readUint8(reader),
|
|
useLegacy: true,
|
|
};
|
|
}
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var _a;
|
|
var info = target.adjustment;
|
|
writeInt16(writer, info.brightness || 0);
|
|
writeInt16(writer, info.contrast || 0);
|
|
writeInt16(writer, (_a = info.meanValue) !== null && _a !== void 0 ? _a : 127);
|
|
writeUint8(writer, info.labColorOnly ? 1 : 0);
|
|
writeZeros(writer, 1);
|
|
});
|
|
function readLevelsChannel(reader) {
|
|
var shadowInput = readInt16(reader);
|
|
var highlightInput = readInt16(reader);
|
|
var shadowOutput = readInt16(reader);
|
|
var highlightOutput = readInt16(reader);
|
|
var midtoneInput = readInt16(reader) / 100;
|
|
return { shadowInput: shadowInput, highlightInput: highlightInput, shadowOutput: shadowOutput, highlightOutput: highlightOutput, midtoneInput: midtoneInput };
|
|
}
|
|
function writeLevelsChannel(writer, channel) {
|
|
writeInt16(writer, channel.shadowInput);
|
|
writeInt16(writer, channel.highlightInput);
|
|
writeInt16(writer, channel.shadowOutput);
|
|
writeInt16(writer, channel.highlightOutput);
|
|
writeInt16(writer, Math.round(channel.midtoneInput * 100));
|
|
}
|
|
addHandler('levl', adjustmentType('levels'), function (reader, target, left) {
|
|
if (readUint16(reader) !== 2)
|
|
throw new Error('Invalid levl version');
|
|
target.adjustment = __assign(__assign({}, target.adjustment), { type: 'levels', rgb: readLevelsChannel(reader), red: readLevelsChannel(reader), green: readLevelsChannel(reader), blue: readLevelsChannel(reader) });
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var info = target.adjustment;
|
|
var defaultChannel = {
|
|
shadowInput: 0,
|
|
highlightInput: 255,
|
|
shadowOutput: 0,
|
|
highlightOutput: 255,
|
|
midtoneInput: 1,
|
|
};
|
|
writeUint16(writer, 2); // version
|
|
writeLevelsChannel(writer, info.rgb || defaultChannel);
|
|
writeLevelsChannel(writer, info.red || defaultChannel);
|
|
writeLevelsChannel(writer, info.blue || defaultChannel);
|
|
writeLevelsChannel(writer, info.green || defaultChannel);
|
|
for (var i = 0; i < 59; i++)
|
|
writeLevelsChannel(writer, defaultChannel);
|
|
});
|
|
function readCurveChannel(reader) {
|
|
var nodes = readUint16(reader);
|
|
var channel = [];
|
|
for (var j = 0; j < nodes; j++) {
|
|
var output = readInt16(reader);
|
|
var input = readInt16(reader);
|
|
channel.push({ input: input, output: output });
|
|
}
|
|
return channel;
|
|
}
|
|
function writeCurveChannel(writer, channel) {
|
|
writeUint16(writer, channel.length);
|
|
for (var _i = 0, channel_1 = channel; _i < channel_1.length; _i++) {
|
|
var n = channel_1[_i];
|
|
writeUint16(writer, n.output);
|
|
writeUint16(writer, n.input);
|
|
}
|
|
}
|
|
addHandler('curv', adjustmentType('curves'), function (reader, target, left) {
|
|
readUint8(reader);
|
|
if (readUint16(reader) !== 1)
|
|
throw new Error('Invalid curv version');
|
|
readUint16(reader);
|
|
var channels = readUint16(reader);
|
|
var info = { type: 'curves' };
|
|
if (channels & 1)
|
|
info.rgb = readCurveChannel(reader);
|
|
if (channels & 2)
|
|
info.red = readCurveChannel(reader);
|
|
if (channels & 4)
|
|
info.green = readCurveChannel(reader);
|
|
if (channels & 8)
|
|
info.blue = readCurveChannel(reader);
|
|
target.adjustment = __assign(__assign({}, target.adjustment), info);
|
|
// ignoring, duplicate information
|
|
// checkSignature(reader, 'Crv ');
|
|
// const cVersion = readUint16(reader);
|
|
// readUint16(reader);
|
|
// const channelCount = readUint16(reader);
|
|
// for (let i = 0; i < channelCount; i++) {
|
|
// const index = readUint16(reader);
|
|
// const nodes = readUint16(reader);
|
|
// for (let j = 0; j < nodes; j++) {
|
|
// const output = readInt16(reader);
|
|
// const input = readInt16(reader);
|
|
// }
|
|
// }
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var info = target.adjustment;
|
|
var rgb = info.rgb, red = info.red, green = info.green, blue = info.blue;
|
|
var channels = 0;
|
|
var channelCount = 0;
|
|
if (rgb && rgb.length) {
|
|
channels |= 1;
|
|
channelCount++;
|
|
}
|
|
if (red && red.length) {
|
|
channels |= 2;
|
|
channelCount++;
|
|
}
|
|
if (green && green.length) {
|
|
channels |= 4;
|
|
channelCount++;
|
|
}
|
|
if (blue && blue.length) {
|
|
channels |= 8;
|
|
channelCount++;
|
|
}
|
|
writeUint8(writer, 0);
|
|
writeUint16(writer, 1); // version
|
|
writeUint16(writer, 0);
|
|
writeUint16(writer, channels);
|
|
if (rgb && rgb.length)
|
|
writeCurveChannel(writer, rgb);
|
|
if (red && red.length)
|
|
writeCurveChannel(writer, red);
|
|
if (green && green.length)
|
|
writeCurveChannel(writer, green);
|
|
if (blue && blue.length)
|
|
writeCurveChannel(writer, blue);
|
|
writeSignature(writer, 'Crv ');
|
|
writeUint16(writer, 4); // version
|
|
writeUint16(writer, 0);
|
|
writeUint16(writer, channelCount);
|
|
if (rgb && rgb.length) {
|
|
writeUint16(writer, 0);
|
|
writeCurveChannel(writer, rgb);
|
|
}
|
|
if (red && red.length) {
|
|
writeUint16(writer, 1);
|
|
writeCurveChannel(writer, red);
|
|
}
|
|
if (green && green.length) {
|
|
writeUint16(writer, 2);
|
|
writeCurveChannel(writer, green);
|
|
}
|
|
if (blue && blue.length) {
|
|
writeUint16(writer, 3);
|
|
writeCurveChannel(writer, blue);
|
|
}
|
|
writeZeros(writer, 2);
|
|
});
|
|
addHandler('expA', adjustmentType('exposure'), function (reader, target, left) {
|
|
if (readUint16(reader) !== 1)
|
|
throw new Error('Invalid expA version');
|
|
target.adjustment = __assign(__assign({}, target.adjustment), { type: 'exposure', exposure: readFloat32(reader), offset: readFloat32(reader), gamma: readFloat32(reader) });
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var info = target.adjustment;
|
|
writeUint16(writer, 1); // version
|
|
writeFloat32(writer, info.exposure);
|
|
writeFloat32(writer, info.offset);
|
|
writeFloat32(writer, info.gamma);
|
|
writeZeros(writer, 2);
|
|
});
|
|
addHandler('vibA', adjustmentType('vibrance'), function (reader, target, left) {
|
|
var desc = readVersionAndDescriptor(reader);
|
|
target.adjustment = { type: 'vibrance' };
|
|
if (desc.vibrance !== undefined)
|
|
target.adjustment.vibrance = desc.vibrance;
|
|
if (desc.Strt !== undefined)
|
|
target.adjustment.saturation = desc.Strt;
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var info = target.adjustment;
|
|
var desc = {};
|
|
if (info.vibrance !== undefined)
|
|
desc.vibrance = info.vibrance;
|
|
if (info.saturation !== undefined)
|
|
desc.Strt = info.saturation;
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
});
|
|
function readHueChannel(reader) {
|
|
return {
|
|
a: readInt16(reader),
|
|
b: readInt16(reader),
|
|
c: readInt16(reader),
|
|
d: readInt16(reader),
|
|
hue: readInt16(reader),
|
|
saturation: readInt16(reader),
|
|
lightness: readInt16(reader),
|
|
};
|
|
}
|
|
function writeHueChannel(writer, channel) {
|
|
var c = channel || {};
|
|
writeInt16(writer, c.a || 0);
|
|
writeInt16(writer, c.b || 0);
|
|
writeInt16(writer, c.c || 0);
|
|
writeInt16(writer, c.d || 0);
|
|
writeInt16(writer, c.hue || 0);
|
|
writeInt16(writer, c.saturation || 0);
|
|
writeInt16(writer, c.lightness || 0);
|
|
}
|
|
addHandler('hue2', adjustmentType('hue/saturation'), function (reader, target, left) {
|
|
if (readUint16(reader) !== 2)
|
|
throw new Error('Invalid hue2 version');
|
|
target.adjustment = __assign(__assign({}, target.adjustment), { type: 'hue/saturation', master: readHueChannel(reader), reds: readHueChannel(reader), yellows: readHueChannel(reader), greens: readHueChannel(reader), cyans: readHueChannel(reader), blues: readHueChannel(reader), magentas: readHueChannel(reader) });
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var info = target.adjustment;
|
|
writeUint16(writer, 2); // version
|
|
writeHueChannel(writer, info.master);
|
|
writeHueChannel(writer, info.reds);
|
|
writeHueChannel(writer, info.yellows);
|
|
writeHueChannel(writer, info.greens);
|
|
writeHueChannel(writer, info.cyans);
|
|
writeHueChannel(writer, info.blues);
|
|
writeHueChannel(writer, info.magentas);
|
|
});
|
|
function readColorBalance(reader) {
|
|
return {
|
|
cyanRed: readInt16(reader),
|
|
magentaGreen: readInt16(reader),
|
|
yellowBlue: readInt16(reader),
|
|
};
|
|
}
|
|
function writeColorBalance(writer, value) {
|
|
writeInt16(writer, value.cyanRed || 0);
|
|
writeInt16(writer, value.magentaGreen || 0);
|
|
writeInt16(writer, value.yellowBlue || 0);
|
|
}
|
|
addHandler('blnc', adjustmentType('color balance'), function (reader, target, left) {
|
|
target.adjustment = {
|
|
type: 'color balance',
|
|
shadows: readColorBalance(reader),
|
|
midtones: readColorBalance(reader),
|
|
highlights: readColorBalance(reader),
|
|
preserveLuminosity: !!readUint8(reader),
|
|
};
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var info = target.adjustment;
|
|
writeColorBalance(writer, info.shadows || {});
|
|
writeColorBalance(writer, info.midtones || {});
|
|
writeColorBalance(writer, info.highlights || {});
|
|
writeUint8(writer, info.preserveLuminosity ? 1 : 0);
|
|
writeZeros(writer, 1);
|
|
});
|
|
addHandler('blwh', adjustmentType('black & white'), function (reader, target, left) {
|
|
var desc = readVersionAndDescriptor(reader);
|
|
target.adjustment = {
|
|
type: 'black & white',
|
|
reds: desc['Rd '],
|
|
yellows: desc.Yllw,
|
|
greens: desc['Grn '],
|
|
cyans: desc['Cyn '],
|
|
blues: desc['Bl '],
|
|
magentas: desc.Mgnt,
|
|
useTint: !!desc.useTint,
|
|
presetKind: desc.bwPresetKind,
|
|
presetFileName: desc.blackAndWhitePresetFileName,
|
|
};
|
|
if (desc.tintColor !== undefined)
|
|
target.adjustment.tintColor = parseColor(desc.tintColor);
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var info = target.adjustment;
|
|
var desc = {
|
|
'Rd ': info.reds || 0,
|
|
Yllw: info.yellows || 0,
|
|
'Grn ': info.greens || 0,
|
|
'Cyn ': info.cyans || 0,
|
|
'Bl ': info.blues || 0,
|
|
Mgnt: info.magentas || 0,
|
|
useTint: !!info.useTint,
|
|
tintColor: serializeColor(info.tintColor),
|
|
bwPresetKind: info.presetKind || 0,
|
|
blackAndWhitePresetFileName: info.presetFileName || '',
|
|
};
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
});
|
|
addHandler('phfl', adjustmentType('photo filter'), function (reader, target, left) {
|
|
var version = readUint16(reader);
|
|
if (version !== 2 && version !== 3)
|
|
throw new Error('Invalid phfl version');
|
|
var color;
|
|
if (version === 2) {
|
|
color = readColor(reader);
|
|
}
|
|
else { // version 3
|
|
// TODO: test this, this is probably wrong
|
|
color = {
|
|
l: readInt32(reader) / 100,
|
|
a: readInt32(reader) / 100,
|
|
b: readInt32(reader) / 100,
|
|
};
|
|
}
|
|
target.adjustment = {
|
|
type: 'photo filter',
|
|
color: color,
|
|
density: readUint32(reader) / 100,
|
|
preserveLuminosity: !!readUint8(reader),
|
|
};
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var info = target.adjustment;
|
|
writeUint16(writer, 2); // version
|
|
writeColor(writer, info.color || { l: 0, a: 0, b: 0 });
|
|
writeUint32(writer, (info.density || 0) * 100);
|
|
writeUint8(writer, info.preserveLuminosity ? 1 : 0);
|
|
writeZeros(writer, 3);
|
|
});
|
|
function readMixrChannel(reader) {
|
|
var red = readInt16(reader);
|
|
var green = readInt16(reader);
|
|
var blue = readInt16(reader);
|
|
skipBytes(reader, 2);
|
|
var constant = readInt16(reader);
|
|
return { red: red, green: green, blue: blue, constant: constant };
|
|
}
|
|
function writeMixrChannel(writer, channel) {
|
|
var c = channel || {};
|
|
writeInt16(writer, c.red);
|
|
writeInt16(writer, c.green);
|
|
writeInt16(writer, c.blue);
|
|
writeZeros(writer, 2);
|
|
writeInt16(writer, c.constant);
|
|
}
|
|
addHandler('mixr', adjustmentType('channel mixer'), function (reader, target, left) {
|
|
if (readUint16(reader) !== 1)
|
|
throw new Error('Invalid mixr version');
|
|
var adjustment = target.adjustment = __assign(__assign({}, target.adjustment), { type: 'channel mixer', monochrome: !!readUint16(reader) });
|
|
if (!adjustment.monochrome) {
|
|
adjustment.red = readMixrChannel(reader);
|
|
adjustment.green = readMixrChannel(reader);
|
|
adjustment.blue = readMixrChannel(reader);
|
|
}
|
|
adjustment.gray = readMixrChannel(reader);
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var info = target.adjustment;
|
|
writeUint16(writer, 1); // version
|
|
writeUint16(writer, info.monochrome ? 1 : 0);
|
|
if (info.monochrome) {
|
|
writeMixrChannel(writer, info.gray);
|
|
writeZeros(writer, 3 * 5 * 2);
|
|
}
|
|
else {
|
|
writeMixrChannel(writer, info.red);
|
|
writeMixrChannel(writer, info.green);
|
|
writeMixrChannel(writer, info.blue);
|
|
writeMixrChannel(writer, info.gray);
|
|
}
|
|
});
|
|
var colorLookupType = createEnum('colorLookupType', '3DLUT', {
|
|
'3dlut': '3DLUT',
|
|
abstractProfile: 'abstractProfile',
|
|
deviceLinkProfile: 'deviceLinkProfile',
|
|
});
|
|
var LUTFormatType = createEnum('LUTFormatType', 'look', {
|
|
look: 'LUTFormatLOOK',
|
|
cube: 'LUTFormatCUBE',
|
|
'3dl': 'LUTFormat3DL',
|
|
});
|
|
var colorLookupOrder = createEnum('colorLookupOrder', 'rgb', {
|
|
rgb: 'rgbOrder',
|
|
bgr: 'bgrOrder',
|
|
});
|
|
addHandler('clrL', adjustmentType('color lookup'), function (reader, target, left) {
|
|
if (readUint16(reader) !== 1)
|
|
throw new Error('Invalid clrL version');
|
|
var desc = readVersionAndDescriptor(reader);
|
|
target.adjustment = { type: 'color lookup' };
|
|
var info = target.adjustment;
|
|
if (desc.lookupType !== undefined)
|
|
info.lookupType = colorLookupType.decode(desc.lookupType);
|
|
if (desc['Nm '] !== undefined)
|
|
info.name = desc['Nm '];
|
|
if (desc.Dthr !== undefined)
|
|
info.dither = desc.Dthr;
|
|
if (desc.profile !== undefined)
|
|
info.profile = desc.profile;
|
|
if (desc.LUTFormat !== undefined)
|
|
info.lutFormat = LUTFormatType.decode(desc.LUTFormat);
|
|
if (desc.dataOrder !== undefined)
|
|
info.dataOrder = colorLookupOrder.decode(desc.dataOrder);
|
|
if (desc.tableOrder !== undefined)
|
|
info.tableOrder = colorLookupOrder.decode(desc.tableOrder);
|
|
if (desc.LUT3DFileData !== undefined)
|
|
info.lut3DFileData = desc.LUT3DFileData;
|
|
if (desc.LUT3DFileName !== undefined)
|
|
info.lut3DFileName = desc.LUT3DFileName;
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var info = target.adjustment;
|
|
var desc = {};
|
|
if (info.lookupType !== undefined)
|
|
desc.lookupType = colorLookupType.encode(info.lookupType);
|
|
if (info.name !== undefined)
|
|
desc['Nm '] = info.name;
|
|
if (info.dither !== undefined)
|
|
desc.Dthr = info.dither;
|
|
if (info.profile !== undefined)
|
|
desc.profile = info.profile;
|
|
if (info.lutFormat !== undefined)
|
|
desc.LUTFormat = LUTFormatType.encode(info.lutFormat);
|
|
if (info.dataOrder !== undefined)
|
|
desc.dataOrder = colorLookupOrder.encode(info.dataOrder);
|
|
if (info.tableOrder !== undefined)
|
|
desc.tableOrder = colorLookupOrder.encode(info.tableOrder);
|
|
if (info.lut3DFileData !== undefined)
|
|
desc.LUT3DFileData = info.lut3DFileData;
|
|
if (info.lut3DFileName !== undefined)
|
|
desc.LUT3DFileName = info.lut3DFileName;
|
|
writeUint16(writer, 1); // version
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
});
|
|
addHandler('nvrt', adjustmentType('invert'), function (reader, target, left) {
|
|
target.adjustment = { type: 'invert' };
|
|
skipBytes(reader, left());
|
|
}, function () {
|
|
// nothing to write here
|
|
});
|
|
addHandler('post', adjustmentType('posterize'), function (reader, target, left) {
|
|
target.adjustment = {
|
|
type: 'posterize',
|
|
levels: readUint16(reader),
|
|
};
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var _a;
|
|
var info = target.adjustment;
|
|
writeUint16(writer, (_a = info.levels) !== null && _a !== void 0 ? _a : 4);
|
|
writeZeros(writer, 2);
|
|
});
|
|
addHandler('thrs', adjustmentType('threshold'), function (reader, target, left) {
|
|
target.adjustment = {
|
|
type: 'threshold',
|
|
level: readUint16(reader),
|
|
};
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var _a;
|
|
var info = target.adjustment;
|
|
writeUint16(writer, (_a = info.level) !== null && _a !== void 0 ? _a : 128);
|
|
writeZeros(writer, 2);
|
|
});
|
|
var grdmColorModels = ['', '', '', 'rgb', 'hsb', '', 'lab'];
|
|
addHandler('grdm', adjustmentType('gradient map'), function (reader, target, left) {
|
|
if (readUint16(reader) !== 1)
|
|
throw new Error('Invalid grdm version');
|
|
var info = {
|
|
type: 'gradient map',
|
|
gradientType: 'solid',
|
|
};
|
|
info.reverse = !!readUint8(reader);
|
|
info.dither = !!readUint8(reader);
|
|
info.name = readUnicodeString(reader);
|
|
info.colorStops = [];
|
|
info.opacityStops = [];
|
|
var stopsCount = readUint16(reader);
|
|
for (var i = 0; i < stopsCount; i++) {
|
|
info.colorStops.push({
|
|
location: readUint32(reader),
|
|
midpoint: readUint32(reader) / 100,
|
|
color: readColor(reader),
|
|
});
|
|
skipBytes(reader, 2);
|
|
}
|
|
var opacityStopsCount = readUint16(reader);
|
|
for (var i = 0; i < opacityStopsCount; i++) {
|
|
info.opacityStops.push({
|
|
location: readUint32(reader),
|
|
midpoint: readUint32(reader) / 100,
|
|
opacity: readUint16(reader) / 0xff,
|
|
});
|
|
}
|
|
var expansionCount = readUint16(reader);
|
|
if (expansionCount !== 2)
|
|
throw new Error('Invalid grdm expansion count');
|
|
var interpolation = readUint16(reader);
|
|
info.smoothness = interpolation / 4096;
|
|
var length = readUint16(reader);
|
|
if (length !== 32)
|
|
throw new Error('Invalid grdm length');
|
|
info.gradientType = readUint16(reader) ? 'noise' : 'solid';
|
|
info.randomSeed = readUint32(reader);
|
|
info.addTransparency = !!readUint16(reader);
|
|
info.restrictColors = !!readUint16(reader);
|
|
info.roughness = readUint32(reader) / 4096;
|
|
info.colorModel = (grdmColorModels[readUint16(reader)] || 'rgb');
|
|
info.min = [
|
|
readUint16(reader) / 0x8000,
|
|
readUint16(reader) / 0x8000,
|
|
readUint16(reader) / 0x8000,
|
|
readUint16(reader) / 0x8000,
|
|
];
|
|
info.max = [
|
|
readUint16(reader) / 0x8000,
|
|
readUint16(reader) / 0x8000,
|
|
readUint16(reader) / 0x8000,
|
|
readUint16(reader) / 0x8000,
|
|
];
|
|
skipBytes(reader, left());
|
|
for (var _i = 0, _a = info.colorStops; _i < _a.length; _i++) {
|
|
var s = _a[_i];
|
|
s.location /= interpolation;
|
|
}
|
|
for (var _b = 0, _c = info.opacityStops; _b < _c.length; _b++) {
|
|
var s = _c[_b];
|
|
s.location /= interpolation;
|
|
}
|
|
target.adjustment = info;
|
|
}, function (writer, target) {
|
|
var _a, _b, _c;
|
|
var info = target.adjustment;
|
|
writeUint16(writer, 1); // version
|
|
writeUint8(writer, info.reverse ? 1 : 0);
|
|
writeUint8(writer, info.dither ? 1 : 0);
|
|
writeUnicodeStringWithPadding(writer, info.name || '');
|
|
writeUint16(writer, info.colorStops && info.colorStops.length || 0);
|
|
var interpolation = Math.round(((_a = info.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096);
|
|
for (var _i = 0, _d = info.colorStops || []; _i < _d.length; _i++) {
|
|
var s = _d[_i];
|
|
writeUint32(writer, Math.round(s.location * interpolation));
|
|
writeUint32(writer, Math.round(s.midpoint * 100));
|
|
writeColor(writer, s.color);
|
|
writeZeros(writer, 2);
|
|
}
|
|
writeUint16(writer, info.opacityStops && info.opacityStops.length || 0);
|
|
for (var _e = 0, _f = info.opacityStops || []; _e < _f.length; _e++) {
|
|
var s = _f[_e];
|
|
writeUint32(writer, Math.round(s.location * interpolation));
|
|
writeUint32(writer, Math.round(s.midpoint * 100));
|
|
writeUint16(writer, Math.round(s.opacity * 0xff));
|
|
}
|
|
writeUint16(writer, 2); // expansion count
|
|
writeUint16(writer, interpolation);
|
|
writeUint16(writer, 32); // length
|
|
writeUint16(writer, info.gradientType === 'noise' ? 1 : 0);
|
|
writeUint32(writer, info.randomSeed || 0);
|
|
writeUint16(writer, info.addTransparency ? 1 : 0);
|
|
writeUint16(writer, info.restrictColors ? 1 : 0);
|
|
writeUint32(writer, Math.round(((_b = info.roughness) !== null && _b !== void 0 ? _b : 1) * 4096));
|
|
var colorModel = grdmColorModels.indexOf((_c = info.colorModel) !== null && _c !== void 0 ? _c : 'rgb');
|
|
writeUint16(writer, colorModel === -1 ? 3 : colorModel);
|
|
for (var i = 0; i < 4; i++)
|
|
writeUint16(writer, Math.round((info.min && info.min[i] || 0) * 0x8000));
|
|
for (var i = 0; i < 4; i++)
|
|
writeUint16(writer, Math.round((info.max && info.max[i] || 0) * 0x8000));
|
|
writeZeros(writer, 4);
|
|
});
|
|
function readSelectiveColors(reader) {
|
|
return {
|
|
c: readInt16(reader),
|
|
m: readInt16(reader),
|
|
y: readInt16(reader),
|
|
k: readInt16(reader),
|
|
};
|
|
}
|
|
function writeSelectiveColors(writer, cmyk) {
|
|
var c = cmyk || {};
|
|
writeInt16(writer, c.c);
|
|
writeInt16(writer, c.m);
|
|
writeInt16(writer, c.y);
|
|
writeInt16(writer, c.k);
|
|
}
|
|
addHandler('selc', adjustmentType('selective color'), function (reader, target) {
|
|
if (readUint16(reader) !== 1)
|
|
throw new Error('Invalid selc version');
|
|
var mode = readUint16(reader) ? 'absolute' : 'relative';
|
|
skipBytes(reader, 8);
|
|
target.adjustment = {
|
|
type: 'selective color',
|
|
mode: mode,
|
|
reds: readSelectiveColors(reader),
|
|
yellows: readSelectiveColors(reader),
|
|
greens: readSelectiveColors(reader),
|
|
cyans: readSelectiveColors(reader),
|
|
blues: readSelectiveColors(reader),
|
|
magentas: readSelectiveColors(reader),
|
|
whites: readSelectiveColors(reader),
|
|
neutrals: readSelectiveColors(reader),
|
|
blacks: readSelectiveColors(reader),
|
|
};
|
|
}, function (writer, target) {
|
|
var info = target.adjustment;
|
|
writeUint16(writer, 1); // version
|
|
writeUint16(writer, info.mode === 'absolute' ? 1 : 0);
|
|
writeZeros(writer, 8);
|
|
writeSelectiveColors(writer, info.reds);
|
|
writeSelectiveColors(writer, info.yellows);
|
|
writeSelectiveColors(writer, info.greens);
|
|
writeSelectiveColors(writer, info.cyans);
|
|
writeSelectiveColors(writer, info.blues);
|
|
writeSelectiveColors(writer, info.magentas);
|
|
writeSelectiveColors(writer, info.whites);
|
|
writeSelectiveColors(writer, info.neutrals);
|
|
writeSelectiveColors(writer, info.blacks);
|
|
});
|
|
addHandler('CgEd', function (target) {
|
|
var a = target.adjustment;
|
|
if (!a)
|
|
return false;
|
|
return (a.type === 'brightness/contrast' && !a.useLegacy) ||
|
|
((a.type === 'levels' || a.type === 'curves' || a.type === 'exposure' || a.type === 'channel mixer' ||
|
|
a.type === 'hue/saturation') && a.presetFileName !== undefined);
|
|
}, function (reader, target, left) {
|
|
var desc = readVersionAndDescriptor(reader);
|
|
if (desc.Vrsn !== 1)
|
|
throw new Error('Invalid CgEd version');
|
|
// this section can specify preset file name for other adjustment types
|
|
if ('presetFileName' in desc) {
|
|
target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.presetKind, presetFileName: desc.presetFileName });
|
|
}
|
|
else if ('curvesPresetFileName' in desc) {
|
|
target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.curvesPresetKind, presetFileName: desc.curvesPresetFileName });
|
|
}
|
|
else if ('mixerPresetFileName' in desc) {
|
|
target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.mixerPresetKind, presetFileName: desc.mixerPresetFileName });
|
|
}
|
|
else {
|
|
target.adjustment = {
|
|
type: 'brightness/contrast',
|
|
brightness: desc.Brgh,
|
|
contrast: desc.Cntr,
|
|
meanValue: desc.means,
|
|
useLegacy: !!desc.useLegacy,
|
|
labColorOnly: !!desc['Lab '],
|
|
auto: !!desc.Auto,
|
|
};
|
|
}
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var _a, _b, _c, _d;
|
|
var info = target.adjustment;
|
|
if (info.type === 'levels' || info.type === 'exposure' || info.type === 'hue/saturation') {
|
|
var desc = {
|
|
Vrsn: 1,
|
|
presetKind: (_a = info.presetKind) !== null && _a !== void 0 ? _a : 1,
|
|
presetFileName: info.presetFileName || '',
|
|
};
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
}
|
|
else if (info.type === 'curves') {
|
|
var desc = {
|
|
Vrsn: 1,
|
|
curvesPresetKind: (_b = info.presetKind) !== null && _b !== void 0 ? _b : 1,
|
|
curvesPresetFileName: info.presetFileName || '',
|
|
};
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
}
|
|
else if (info.type === 'channel mixer') {
|
|
var desc = {
|
|
Vrsn: 1,
|
|
mixerPresetKind: (_c = info.presetKind) !== null && _c !== void 0 ? _c : 1,
|
|
mixerPresetFileName: info.presetFileName || '',
|
|
};
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
}
|
|
else if (info.type === 'brightness/contrast') {
|
|
var desc = {
|
|
Vrsn: 1,
|
|
Brgh: info.brightness || 0,
|
|
Cntr: info.contrast || 0,
|
|
means: (_d = info.meanValue) !== null && _d !== void 0 ? _d : 127,
|
|
'Lab ': !!info.labColorOnly,
|
|
useLegacy: !!info.useLegacy,
|
|
Auto: !!info.auto,
|
|
};
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
}
|
|
else {
|
|
throw new Error('Unhandled CgEd case');
|
|
}
|
|
});
|
|
addHandler('Txt2', hasKey('engineData'), function (reader, target, left) {
|
|
var data = readBytes(reader, left());
|
|
target.engineData = fromByteArray(data);
|
|
// const engineData = parseEngineData(data);
|
|
// console.log(require('util').inspect(engineData, false, 99, true));
|
|
// require('fs').writeFileSync('resources/engineData2Simple.txt', require('util').inspect(engineData, false, 99, false), 'utf8');
|
|
// require('fs').writeFileSync('test_data.json', JSON.stringify(ed, null, 2), 'utf8');
|
|
}, function (writer, target) {
|
|
var buffer = toByteArray(target.engineData);
|
|
writeBytes(writer, buffer);
|
|
});
|
|
addHandler('FMsk', hasKey('filterMask'), function (reader, target) {
|
|
target.filterMask = {
|
|
colorSpace: readColor(reader),
|
|
opacity: readUint16(reader) / 0xff,
|
|
};
|
|
}, function (writer, target) {
|
|
var _a;
|
|
writeColor(writer, target.filterMask.colorSpace);
|
|
writeUint16(writer, clamp((_a = target.filterMask.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 0xff);
|
|
});
|
|
addHandler('artd', // document-wide artboard info
|
|
function (// document-wide artboard info
|
|
target) { return target.artboards !== undefined; }, function (reader, target, left) {
|
|
var desc = readVersionAndDescriptor(reader);
|
|
target.artboards = {
|
|
count: desc['Cnt '],
|
|
autoExpandOffset: { horizontal: desc.autoExpandOffset.Hrzn, vertical: desc.autoExpandOffset.Vrtc },
|
|
origin: { horizontal: desc.origin.Hrzn, vertical: desc.origin.Vrtc },
|
|
autoExpandEnabled: desc.autoExpandEnabled,
|
|
autoNestEnabled: desc.autoNestEnabled,
|
|
autoPositionEnabled: desc.autoPositionEnabled,
|
|
shrinkwrapOnSaveEnabled: desc.shrinkwrapOnSaveEnabled,
|
|
docDefaultNewArtboardBackgroundColor: parseColor(desc.docDefaultNewArtboardBackgroundColor),
|
|
docDefaultNewArtboardBackgroundType: desc.docDefaultNewArtboardBackgroundType,
|
|
};
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var _a, _b, _c, _d, _e;
|
|
var artb = target.artboards;
|
|
var desc = {
|
|
'Cnt ': artb.count,
|
|
autoExpandOffset: artb.autoExpandOffset ? { Hrzn: artb.autoExpandOffset.horizontal, Vrtc: artb.autoExpandOffset.vertical } : { Hrzn: 0, Vrtc: 0 },
|
|
origin: artb.origin ? { Hrzn: artb.origin.horizontal, Vrtc: artb.origin.vertical } : { Hrzn: 0, Vrtc: 0 },
|
|
autoExpandEnabled: (_a = artb.autoExpandEnabled) !== null && _a !== void 0 ? _a : true,
|
|
autoNestEnabled: (_b = artb.autoNestEnabled) !== null && _b !== void 0 ? _b : true,
|
|
autoPositionEnabled: (_c = artb.autoPositionEnabled) !== null && _c !== void 0 ? _c : true,
|
|
shrinkwrapOnSaveEnabled: (_d = artb.shrinkwrapOnSaveEnabled) !== null && _d !== void 0 ? _d : true,
|
|
docDefaultNewArtboardBackgroundColor: serializeColor(artb.docDefaultNewArtboardBackgroundColor),
|
|
docDefaultNewArtboardBackgroundType: (_e = artb.docDefaultNewArtboardBackgroundType) !== null && _e !== void 0 ? _e : 1,
|
|
};
|
|
writeVersionAndDescriptor(writer, '', 'null', desc, 'artd');
|
|
});
|
|
export function hasMultiEffects(effects) {
|
|
return Object.keys(effects).map(function (key) { return effects[key]; }).some(function (v) { return Array.isArray(v) && v.length > 1; });
|
|
}
|
|
addHandler('lfx2', function (target) { return target.effects !== undefined && !hasMultiEffects(target.effects); }, function (reader, target, left, _, options) {
|
|
var version = readUint32(reader);
|
|
if (version !== 0)
|
|
throw new Error("Invalid lfx2 version");
|
|
var desc = readVersionAndDescriptor(reader);
|
|
// console.log(require('util').inspect(desc, false, 99, true));
|
|
// TODO: don't discard if we got it from lmfx
|
|
// discard if read in 'lrFX' section
|
|
target.effects = parseEffects(desc, !!options.logMissingFeatures);
|
|
skipBytes(reader, left());
|
|
}, function (writer, target, _, options) {
|
|
var desc = serializeEffects(target.effects, !!options.logMissingFeatures, false);
|
|
// console.log(require('util').inspect(desc, false, 99, true));
|
|
writeUint32(writer, 0); // version
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
});
|
|
addHandler('cinf', hasKey('compositorUsed'), function (reader, target, left) {
|
|
var desc = readVersionAndDescriptor(reader);
|
|
// console.log(require('util').inspect(desc, false, 99, true));
|
|
target.compositorUsed = {
|
|
description: desc.description,
|
|
reason: desc.reason,
|
|
engine: desc.Engn.split('.')[1],
|
|
enableCompCore: desc.enableCompCore.split('.')[1],
|
|
enableCompCoreGPU: desc.enableCompCoreGPU.split('.')[1],
|
|
compCoreSupport: desc.compCoreSupport.split('.')[1],
|
|
compCoreGPUSupport: desc.compCoreGPUSupport.split('.')[1],
|
|
};
|
|
skipBytes(reader, left());
|
|
}, function (writer, target) {
|
|
var cinf = target.compositorUsed;
|
|
var desc = {
|
|
Vrsn: { major: 1, minor: 0, fix: 0 },
|
|
// psVersion: { major: 22, minor: 3, fix: 1 }, // TESTING
|
|
description: cinf.description,
|
|
reason: cinf.reason,
|
|
Engn: "Engn.".concat(cinf.engine),
|
|
enableCompCore: "enable.".concat(cinf.enableCompCore),
|
|
enableCompCoreGPU: "enable.".concat(cinf.enableCompCoreGPU),
|
|
// enableCompCoreThreads: `enable.feature`, // TESTING
|
|
compCoreSupport: "reason.".concat(cinf.compCoreSupport),
|
|
compCoreGPUSupport: "reason.".concat(cinf.compCoreGPUSupport),
|
|
};
|
|
writeVersionAndDescriptor(writer, '', 'null', desc);
|
|
});
|
|
// extension settings ?, ignore it
|
|
addHandler('extn', function (target) { return target._extn !== undefined; }, function (reader, target) {
|
|
var desc = readVersionAndDescriptor(reader);
|
|
// console.log(require('util').inspect(desc, false, 99, true));
|
|
if (MOCK_HANDLERS)
|
|
target._extn = desc;
|
|
}, function (writer, target) {
|
|
// TODO: need to add correct types for desc fields (resources/src.psd)
|
|
if (MOCK_HANDLERS)
|
|
writeVersionAndDescriptor(writer, '', 'null', target._extn);
|
|
});
|
|
addHandler('iOpa', hasKey('fillOpacity'), function (reader, target) {
|
|
target.fillOpacity = readUint8(reader) / 0xff;
|
|
skipBytes(reader, 3);
|
|
}, function (writer, target) {
|
|
writeUint8(writer, target.fillOpacity * 0xff);
|
|
writeZeros(writer, 3);
|
|
});
|
|
addHandler('brst', hasKey('channelBlendingRestrictions'), function (reader, target, left) {
|
|
target.channelBlendingRestrictions = [];
|
|
while (left() > 4) {
|
|
target.channelBlendingRestrictions.push(readInt32(reader));
|
|
}
|
|
}, function (writer, target) {
|
|
for (var _i = 0, _a = target.channelBlendingRestrictions; _i < _a.length; _i++) {
|
|
var channel = _a[_i];
|
|
writeInt32(writer, channel);
|
|
}
|
|
});
|
|
addHandler('tsly', hasKey('transparencyShapesLayer'), function (reader, target) {
|
|
target.transparencyShapesLayer = !!readUint8(reader);
|
|
skipBytes(reader, 3);
|
|
}, function (writer, target) {
|
|
writeUint8(writer, target.transparencyShapesLayer ? 1 : 0);
|
|
writeZeros(writer, 3);
|
|
});
|
|
|
|
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFkZGl0aW9uYWxJbmZvLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUFFLGFBQWEsRUFBRSxXQUFXLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFDdkQsT0FBTyxFQUFFLFdBQVcsRUFBRSxZQUFZLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUM3RCxPQUFPLEVBQUUsS0FBSyxFQUFFLFVBQVUsRUFBRSxXQUFXLEVBQUUsYUFBYSxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBVTFFLE9BQU8sRUFDSyxhQUFhLEVBQUUsaUJBQWlCLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxTQUFTLEVBQUUsV0FBVyxFQUFFLFVBQVUsRUFDdEcsU0FBUyxFQUFFLFNBQVMsRUFBRSxjQUFjLEVBQUUsV0FBVyxFQUFFLG9CQUFvQixFQUFFLFdBQVcsRUFBRSxTQUFTLEVBQUUsU0FBUyxFQUMxRyxnQkFBZ0IsRUFBRSwyQkFBMkIsRUFBRSxlQUFlLEVBQUUsV0FBVyxHQUMzRSxNQUFNLGFBQWEsQ0FBQztBQUNyQixPQUFPLEVBQ0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