@thi.ng/pixel-io-pfm
Version:
Portable FloatMap image format support for @thi.ng/pixel
25 lines • 910 B
TypeScript
import type { FloatBuffer } from "@thi.ng/pixel/float";
import { IntBuffer } from "@thi.ng/pixel/int";
/**
* Serializes given image to Portable FloatMap format and returns it as byte
* array.
*
* @remarks
* If `littleEndian` is true (default), the pixel values are written in LE
* order.
*
* If `linearRGB` is true (default), the original pixel values are interpreted
* as sRGB and will be converted to linear RGB. If false, no conversion occurs.
*
* If needed, the given image will be automatically converted to
* [`FLOAT_RGB`](https://docs.thi.ng/umbrella/pixel/variables/FLOAT_RGB.html)
* format.
*
* Format reference: https://pauldebevec.com/Research/HDR/PFM/
*
* @param img
* @param littleEndian
* @param linearRGB
*/
export declare const asPFM: (img: IntBuffer | FloatBuffer, littleEndian?: boolean, linearRGB?: boolean) => Uint8Array<ArrayBuffer>;
//# sourceMappingURL=write.d.ts.map