/* istanbul ignore next */
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
define(["require", "exports", "./../../graphics/images/image-decoder", "./../../graphics/images/byte-array", "./../../input-output/pdf-dictionary-properties", "./pdf-image"], function (require, exports, image_decoder_1, byte_array_1, pdf_dictionary_properties_1, pdf_image_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var PdfBitmap = (function (_super) {
__extends(PdfBitmap, _super);
function PdfBitmap(encodedString) {
var _this = _super.call(this) || this;
_this.imageStatus = true;
_this.dictionaryProperties = new pdf_dictionary_properties_1.DictionaryProperties();
_this.loadImage(encodedString);
return _this;
}
PdfBitmap.prototype.loadImage = function (encodedString) {
var task = this.initializeAsync(encodedString);
};
PdfBitmap.prototype.initializeAsync = function (encodedString) {
var byteArray = new byte_array_1.ByteArray(encodedString.length);
byteArray.writeFromBase64String(encodedString);
this.decoder = new image_decoder_1.ImageDecoder(byteArray);
this.height = this.decoder.height;
this.width = this.decoder.width;
this.bitsPerComponent = this.decoder.bitsPerComponent;
};
PdfBitmap.prototype.save = function () {
this.imageStatus = true;
this.imageStream = this.decoder.getImageDictionary();
};
return PdfBitmap;
}(pdf_image_1.PdfImage));
exports.PdfBitmap = PdfBitmap;
});
|