import { HistogramData, OperationOption } from './types'; /** * Core logic for the imgstry editor. * Defines all the processing logic. * * @export * @abstract * @class ImgstryProcessor * @ignore */ export declare abstract class ImgstryProcessor { /** * Width of the image. * * @type {number} * @memberOf ImgstryProcessor */ abstract width: number; /** * Height of the image. * * @type {number} * @memberOf ImgstryProcessor */ abstract height: number; /** * Original copy of the processed image. * * @type {ImageData} * @memberOf ImgstryProcessor */ protected _original: ImageData | null; /** * Encodes the canvas data to a data URI. * * @param {string} type The standard MIME type for the image format to return. * If you do not specify this parameter, the default value is a PNG format image. * @returns {string} The image encoded as a data url. * @memberof Imgstry */ abstract toDataUrl(type: string): string; /** * Resets the image to the original state. * * @abstract * @returns {ImgstryProcessor} The current processor instance. * * @memberOf ImgstryProcessor */ abstract reset(): ImgstryProcessor; /** * Clone image data * * @abstract * @param {ImageData} source The source image data. * @returns {ImageData} The cloned canvas image data. * @memberOf ImgstryProcessor */ abstract clone(source: ImageData): ImageData; /** * Create image data based on a source * * @abstract * @param {ImageData} source The source image data. * @returns {ImageData} The new image data. * @memberOf ImgstryProcessor */ abstract createImageData(source: ImageData): ImageData; /** * Gets the image data. * * @abstract * @type {ImageData} * @memberOf ImgstryProcessor */ abstract get imageData(): ImageData; /** * Sets the image data. * * @abstract * * @memberOf ImgstryProcessor */ abstract set imageData(imgData: ImageData); /** * Returns the channel histogram of the image. * * @readonly * @type {HistogramData} * @memberof ImgstryProcessor */ get histogram(): HistogramData; /** * Applies a series of filters to the image. * * @param {OperationOption[]} options The set of operations. * @param {boolean} [reset] If the image should be reset to its original state before applying operations. * @returns {ImgstryProcessor} The current processor instance * @memberof ImgstryProcessor */ batch(options: OperationOption[], reset?: boolean): ImgstryProcessor; private _convolve; private _matrixTraverse; private _traverse; }