/// <reference types="node" />
import ErrorSubclass from 'error-subclass';
export declare class PPMParseError extends ErrorSubclass {
    static displayName: string;
}
/**
 * Netpbm PPM color image format.
 *
 * http://netpbm.sourceforge.net/doc/ppm.html
 */
export default class PortablePixmap {
    width: number;
    height: number;
    maxval: number;
    data: Buffer;
    /**
     * Construct a PPM instance directly in memory.
     */
    constructor(width: number, height: number, maxval: number, data: Buffer);
    /**
     * Convert the image data to an RGBA8888 raster, suitable for input to
     * an HTML5 Canvas API ImageData object.
     *
     * @param destination existing array to write into
     */
    toRGBA8888(destination?: Uint8Array | Uint8ClampedArray): Uint8Array | Uint8ClampedArray;
    /**
     * Parse PPM (Netpbm color image) format data.
     *
     * The pixel raster data in the constructed image is a slice of the
     * input buffer, so mutating the buffer will also mutate the image.
     *
     * @param buffer buffer of PPM-format image data
     */
    static parse(buffer: Buffer): PortablePixmap;
}
