image-in-browser
Version:
Package for encoding / decoding images, transforming images, applying filters, drawing primitives on images on the client side (no need for server Node.js)
137 lines • 3.57 kB
JavaScript
export class PngInfo {
get width() {
return this._width;
}
set width(v) {
this._width = v;
}
set height(v) {
this._height = v;
}
get height() {
return this._height;
}
get backgroundColor() {
return this._backgroundColor;
}
set backgroundColor(v) {
this._backgroundColor = v;
}
get numFrames() {
return this._numFrames;
}
set numFrames(v) {
this._numFrames = v;
}
get bits() {
return this._bits;
}
set bits(v) {
this._bits = v;
}
get colorType() {
return this._colorType;
}
set colorType(v) {
this._colorType = v;
}
get compressionMethod() {
return this._compressionMethod;
}
set compressionMethod(v) {
this._compressionMethod = v;
}
get filterMethod() {
return this._filterMethod;
}
set filterMethod(v) {
this._filterMethod = v;
}
get interlaceMethod() {
return this._interlaceMethod;
}
set interlaceMethod(v) {
this._interlaceMethod = v;
}
get palette() {
return this._palette;
}
set palette(v) {
this._palette = v;
}
get transparency() {
return this._transparency;
}
set transparency(v) {
this._transparency = v;
}
get gamma() {
return this._gamma;
}
set gamma(v) {
this._gamma = v;
}
get iccpName() {
return this._iccpName;
}
set iccpName(v) {
this._iccpName = v;
}
get iccpCompression() {
return this._iccpCompression;
}
set iccpCompression(v) {
this._iccpCompression = v;
}
get iccpData() {
return this._iccpData;
}
set iccpData(v) {
this._iccpData = v;
}
get textData() {
return this._textData;
}
get pixelDimensions() {
return this._pixelDimensions;
}
set pixelDimensions(v) {
this._pixelDimensions = v;
}
get repeat() {
return this._repeat;
}
set repeat(v) {
this._repeat = v;
}
get idat() {
return this._idat;
}
get frames() {
return this._frames;
}
get isAnimated() {
return this._frames.length > 0;
}
constructor(opt) {
var _a, _b, _c, _d, _e, _f;
this._width = 0;
this._height = 0;
this._backgroundColor = undefined;
this._numFrames = 1;
this._iccpName = '';
this._iccpCompression = 0;
this._textData = new Map();
this._repeat = 0;
this._idat = [];
this._frames = [];
this._width = (_a = opt === null || opt === void 0 ? void 0 : opt.width) !== null && _a !== void 0 ? _a : 0;
this._height = (_b = opt === null || opt === void 0 ? void 0 : opt.height) !== null && _b !== void 0 ? _b : 0;
this._bits = (_c = opt === null || opt === void 0 ? void 0 : opt.bits) !== null && _c !== void 0 ? _c : 0;
this._colorType = opt === null || opt === void 0 ? void 0 : opt.colorType;
this._compressionMethod = (_d = opt === null || opt === void 0 ? void 0 : opt.compressionMethod) !== null && _d !== void 0 ? _d : 0;
this._filterMethod = (_e = opt === null || opt === void 0 ? void 0 : opt.filterMethod) !== null && _e !== void 0 ? _e : 0;
this._interlaceMethod = (_f = opt === null || opt === void 0 ? void 0 : opt.interlaceMethod) !== null && _f !== void 0 ? _f : 0;
}
}
//# sourceMappingURL=png-info.js.map