import { ImagePoolInterface } from './ImagePoolInterface'; import { ImageImageData } from './ImageImageData'; import { ImageWebGLTexture } from './ImageWebGLTexture'; export interface ImageInterface { width: number; height: number; reset(): void; /** * Increase reference counter. */ retain(): void; /** * Decrease reference counter, if * it reaches zero, the image will * be returned to the image pool. */ release(): void; returnImage(): void; getPixelSize(): number[]; asWebGLTexture(): ImageWebGLTexture; asImageData(): ImageImageData; drawToContext2D(context: CanvasRenderingContext2D): void; } export declare class Image implements ImageInterface { protected pool: ImagePoolInterface; private refCount; private pixelSize; constructor(pool?: ImagePoolInterface); reset(): void; retain(): void; release(): void; returnImage(): void; readonly width: number; readonly height: number; getPixelSize(): number[]; asWebGLTexture(): ImageWebGLTexture; asImageData(): ImageImageData; drawToContext2D(context: CanvasRenderingContext2D): void; }