import type { AV1CodecConfig, ISOBMFFBox } from '../types'; /** Parse `pitm` (primary item id). */ export declare function parsePitm(data: Uint8Array): number; /** Parse `iref` child boxes into flat references. */ export declare function parseIref(box: ISOBMFFBox): ItemReference[]; /** Parse `ipma` associations (which ipco properties apply to which item). */ export declare function parseIpma(data: Uint8Array): PropertyAssociation[]; /** * The item holding the primary image's alpha, or null. * * Per MIAF, alpha is an ordinary `av01` item that points at the image it * belongs to with an `auxl` reference and says what it is with an `auxC` * property. Checking the `auxC` type matters: a depth map is an auxiliary * image too, and applying one as transparency would punch holes in a photo. * `urn:mpeg:hevc:2015:auxid:1` is the older HEVC spelling some writers use. */ export declare function findAlphaItemId(boxes: ISOBMFFBox[]): number | null; /** Parse a `grid` derived-image item body. */ export declare function parseGridBody(data: Uint8Array): Omit; /** * Resolve the full picture of an AVIF file's primary image with per-item * property association (grid-safe, unlike the legacy first-property scan). */ export declare function getAvifItemInfo(buffer: Uint8Array, boxes: ISOBMFFBox[]): AvifItemInfo; /** * Extract one item's payload, honoring the iloc construction method: * 0 = absolute file offsets, 1 = offsets into the `idat` box inside `meta`. */ export declare function getItemPayload(buffer: Uint8Array, boxes: ISOBMFFBox[], itemId: number): Uint8Array | null; export declare interface AvifGridInfo { rows: number columns: number outputWidth: number outputHeight: number tileItemIds: number[] tileWidth: number tileHeight: number } export declare interface AvifItemInfo { primaryItemId: number primaryItemType: string width: number height: number bitDepth: number rotation: number mirror: number | null hasAlpha: boolean av1C: AV1CodecConfig | null grid: AvifGridInfo | null } declare interface ItemReference { referenceType: string fromItemId: number toItemIds: number[] } declare interface PropertyAssociation { itemId: number propertyIndexes: number[] }