/** * The natural print size of a bitmap (#631). A bitmap declares its pixel * count (`Resource.bitmap.width` / `height`); how many of those pixels go * to an inch decides the size it is laid out at before the column caps it: * * - its own `resolution`, when it declares one; * - else the document's `layout.bitmapResolution`: a number is the ppi of * every such bitmap, `'file'` the resolution read from the file * (`fileResolution`, 72 and 96 counting as unset), `'document'` (the * default) none; * - with none, one pixel per layout px (`page.dpi`). * * A build stamps the document's policy onto the bitmaps that take it * (`withBitmapResolutions`), so the layout code reads `bitmap.resolution` * alone (`bitmapLayoutSize`). */ import type { BitmapResolution, Resource } from './types.js'; type Bitmap = NonNullable; /** 72 and 96 ppi, what cameras, screenshots and web exports write when * they know nothing of a print size: `'file'` reads them as unset. */ export declare function isPlaceholderResolution(ppi: number): boolean; /** The ppi a bitmap takes its natural size from under `policy`, or * `undefined` when its pixels are read at `page.dpi`. */ export declare function bitmapResolutionFor(bitmap: Pick, policy?: BitmapResolution): number | undefined; /** The ppi a bitmap is laid out at before the column caps it: its * resolution under `policy`, else `dpi`. */ export declare function effectiveBitmapResolution(bitmap: Pick, policy: BitmapResolution | undefined, dpi: number): number; /** A bitmap's natural size in layout px at `dpi`: its pixels scaled by * `dpi / resolution`, or the pixels themselves without a resolution. */ export declare function bitmapLayoutSize(bitmap: Pick, dpi: number): { width: number; height: number; }; /** `resources` with the document's policy written into the `resolution` * of every bitmap that has none and takes one from it. Under * `'document'`, or when no bitmap changes, the same array (and the same * objects) come back, so a document that does not opt in lays out and * serialises exactly as before. Memoised per array and policy: the * passes of a build see the same objects. */ export declare function withBitmapResolutions(resources: readonly Resource[], policy: BitmapResolution | undefined): readonly Resource[]; export {}; //# sourceMappingURL=bitmapResolution.d.ts.map