@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
103 lines • 4.08 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MetadataImageEntry = void 0;
class MetadataImageEntry {
constructor(data) {
let colorDepthDefault = 0;
this.colorDepth = typeof (data === null || data === void 0 ? void 0 : data.colorDepth) !== "undefined" ? data === null || data === void 0 ? void 0 : data.colorDepth : colorDepthDefault;
let heightDefault = 0;
this.height = typeof (data === null || data === void 0 ? void 0 : data.height) !== "undefined" ? data === null || data === void 0 ? void 0 : data.height : heightDefault;
let isAnimatedDefault = false;
this.isAnimated = typeof (data === null || data === void 0 ? void 0 : data.isAnimated) !== "undefined" ? data === null || data === void 0 ? void 0 : data.isAnimated : isAnimatedDefault;
let metadataDefault = {};
this.metadata = typeof (data === null || data === void 0 ? void 0 : data.metadata) !== "undefined" ? data === null || data === void 0 ? void 0 : data.metadata : metadataDefault;
let orientationDefault = "topLeft";
this.orientation = typeof (data === null || data === void 0 ? void 0 : data.orientation) !== "undefined" ? data === null || data === void 0 ? void 0 : data.orientation : orientationDefault;
let unitDefault = "inch";
this.unit = typeof (data === null || data === void 0 ? void 0 : data.unit) !== "undefined" ? data === null || data === void 0 ? void 0 : data.unit : unitDefault;
let widthDefault = 0;
this.width = typeof (data === null || data === void 0 ? void 0 : data.width) !== "undefined" ? data === null || data === void 0 ? void 0 : data.width : widthDefault;
let xResDefault = 0;
this.xRes = typeof (data === null || data === void 0 ? void 0 : data.xRes) !== "undefined" ? data === null || data === void 0 ? void 0 : data.xRes : xResDefault;
let yResDefault = 0;
this.yRes = typeof (data === null || data === void 0 ? void 0 : data.yRes) !== "undefined" ? data === null || data === void 0 ? void 0 : data.yRes : yResDefault;
}
static getColorDepthDefault() {
return 0;
}
static getColorDepthDescription() {
return "Color depth in bits";
}
static getHeightDefault() {
return 0;
}
static getHeightDescription() {
return "Image height";
}
static getIsAnimatedDefault() {
return false;
}
static getIsAnimatedDescription() {
return "True if it is an animated image";
}
static getMetadataDefault() {
return {};
}
static getMetadataDescription() {
return "Metadata dictionary of the image file format";
}
static getOrientationDefault() {
return "topLeft";
}
static getOrientationDescription() {
return "";
}
static getUnitDefault() {
return "inch";
}
static getUnitDescription() {
return "";
}
static getWidthDefault() {
return 0;
}
static getWidthDescription() {
return "Image width";
}
static getXResDefault() {
return 0;
}
static getXResDescription() {
return "Horizontal resolution";
}
static getYResDefault() {
return 0;
}
static getYResDescription() {
return "Vertical resolution";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new MetadataImageEntry(data);
}
toJson() {
return {
'colorDepth': this.colorDepth,
'height': this.height,
'isAnimated': this.isAnimated,
'metadata': this.metadata,
'orientation': this.orientation,
'unit': this.unit,
'width': this.width,
'xRes': this.xRes,
'yRes': this.yRes,
};
}
clone() {
return MetadataImageEntry.fromJson(this.toJson());
}
}
exports.MetadataImageEntry = MetadataImageEntry;
//# sourceMappingURL=MetadataImageEntry.js.map