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)
56 lines • 1.52 kB
JavaScript
export class JpegComponent {
get hSamples() {
return this._hSamples;
}
get vSamples() {
return this._vSamples;
}
get blocks() {
return this._blocks;
}
get blocksPerLine() {
return this._blocksPerLine;
}
get blocksPerColumn() {
return this._blocksPerColumn;
}
set huffmanTableDC(v) {
this._huffmanTableDC = v;
}
get huffmanTableDC() {
return this._huffmanTableDC;
}
set huffmanTableAC(v) {
this._huffmanTableAC = v;
}
get huffmanTableAC() {
return this._huffmanTableAC;
}
set pred(v) {
this._pred = v;
}
get pred() {
return this._pred;
}
get quantizationTable() {
return this._quantizationTableList[this._quantizationIndex];
}
constructor(hSamples, vSamples, quantizationTableList, quantizationIndex) {
this._blocks = new Array();
this._blocksPerLine = 0;
this._blocksPerColumn = 0;
this._huffmanTableDC = [];
this._huffmanTableAC = [];
this._pred = 0;
this._hSamples = hSamples;
this._vSamples = vSamples;
this._quantizationTableList = quantizationTableList;
this._quantizationIndex = quantizationIndex;
}
setBlocks(blocks, blocksPerLine, blocksPerColumn) {
this._blocks = blocks;
this._blocksPerLine = blocksPerLine;
this._blocksPerColumn = blocksPerColumn;
}
}
//# sourceMappingURL=jpeg-component.js.map