import { ReadableByteStream } from "@open-flash/stream"; export interface ImageDimensions { width: number; height: number; } export declare const PNG_START: Uint8Array; export declare const GIF_START: Uint8Array; export declare const JPEG_START: Uint8Array; export declare const ERRONEOUS_JPEG_START: Uint8Array; /** * Reads image properties from a byte stream with the content of a PNG image. * It trusts that the image has a valid PNG signature (first 8 bytes). * * @see https://www.w3.org/TR/PNG/#5Chunk-layout * @see https://www.w3.org/TR/PNG/#5ChunkOrdering * @see https://www.w3.org/TR/PNG/#11IHDR */ export declare function getPngImageDimensions(byteStream: ReadableByteStream): ImageDimensions; export declare function getJpegImageDimensions(byteStream: ReadableByteStream): ImageDimensions; export declare function getGifImageDimensions(byteStream: ReadableByteStream): ImageDimensions; /** * Returns a boolean indicating if `imageData` starts with `startBytes` */ export declare function testImageStart(imageData: Uint8Array, startBytes: Uint8Array): boolean;