Skip to content

modern-pdf-lib


modern-pdf-lib / decodeImageStream

Function: decodeImageStream()

decodeImageStream(imageInfo): Uint8Array

Defined in: src/assets/image/imageExtract.ts:281

Decode image stream data into raw pixels.

For DCTDecode (JPEG) streams, returns the raw JPEG bytes (not decoded to pixels) since JPEG decoding requires the WASM module.

For FlateDecode and other filters, fully decodes the stream.

Parameters

imageInfo

ImageInfo

An ImageInfo from extractImages().

Returns

Uint8Array

The decoded stream data.

Released under the MIT License.