import type { ImageData as JPEGImageData } from 'jpeg-js'; import type { ImageData as PNGImageData } from 'fast-png'; export declare type ImageData = PNGImageData | JPEGImageData; /** * Use the ImageData from a Canvas and turn the image in a 1-bit black and white image using dithering */ declare const _default: { /** * Change the image to grayscale * * @param {object} image The imageData of a Canvas 2d context * @return {object} The resulting imageData * */ grayscale(image: ImageData): ImageData; /** * Change the image to blank and white using a simple threshold * * @param {object} image The imageData of a Canvas 2d context * @param {number} threshold Threshold value (0-255) * @return {object} The resulting imageData * */ threshold(image: ImageData, threshold: number): ImageData; /** * Change the image to blank and white using the Bayer algorithm * * @param {object} image The imageData of a Canvas 2d context * @param {number} threshold Threshold value (0-255) * @return {object} The resulting imageData * */ bayer(image: ImageData, threshold: number): ImageData; /** * Change the image to blank and white using the Floyd-Steinberg algorithm * * @param {object} image The imageData of a Canvas 2d context * @return {object} The resulting imageData * */ floydsteinberg(image: ImageData): ImageData; /** * Change the image to blank and white using the Atkinson algorithm * * @param {object} image The imageData of a Canvas 2d context * @return {object} The resulting imageData * */ atkinson(image: ImageData): ImageData; }; export default _default;