Skip to content

modern-pdf-lib


modern-pdf-lib / ImageInfo

Interface: ImageInfo

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

Information about a single image XObject in a PDF document.

Properties

bitsPerComponent

readonly bitsPerComponent: number

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

Bits per component (typically 8).


channels

readonly channels: number

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

Number of color channels (1, 3, or 4).


colorSpace

readonly colorSpace: string

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

PDF color space name (e.g. 'DeviceRGB', 'DeviceGray', 'DeviceCMYK').


compressedSize

readonly compressedSize: number

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

Size of the compressed stream data in bytes.


filters

readonly filters: readonly string[]

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

PDF filter name(s) applied to this stream.


height

readonly height: number

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

Image height in pixels.


name

readonly name: string

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

Resource name on the page (e.g. '/Im1').


pageIndex

readonly pageIndex: number

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

Zero-based page index where this image appears.


ref

readonly ref: PdfRef

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

The indirect reference to this stream in the registry.


stream

readonly stream: PdfStream

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

The PdfStream object for this image (can be mutated for in-place optimization).


width

readonly width: number

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

Image width in pixels.

Released under the MIT License.