ImageInfo

Overview

ImageInfo is a class in Aspose.PDF FOSS for TypeScript.

A single embedded image XObject: a live, read-only handle over its stream.

This class declares 4 methods for ImageInfo objects in TypeScript programs. Available methods include: Decode, Remove, Replace, constructor. All public members are accessible to any TypeScript application after installing the Aspose.PDF FOSS for TypeScript package. Properties: Bits, ColorSpace, Dict, Filter, Height, RawData, and 4 more.

Properties

NameTypeAccessDescription
DictPdfDictReadGets the dict.
StreamPdfStreamReadGets the stream.
WidthnumberReadGets the width.
HeightnumberReadGets the height.
BitsnumberReadGets the bits.
ColorSpacestringReadGets the color space.
Filterstring | undefinedReadGets the filter.
RawDataUint8ArrayReadGets the raw data.
names: string[]ReadGets the names.
parms: (PdfDict | undefined)[]ReadGets the parms.

Methods

SignatureDescription
constructor(doc: Document, Name: string, stream: PdfStream, page: Page)Calls constructor(doc, Name, stream, page) on this ImageInfo instance.
Decode()Uint8ArrayDecoded bytes.
Replace(data: Uint8Array, opts: ReplaceImageOptions)Swap this image’s picture for data (JPEG, PNG, BMP or TIFF), keeping its placement on the page.
Remove(opts: RemoveImageOptions)Drop this image from the page this handle came from: every draw of it in the page’s content (including inside Form XObjects) and its /XObject resource entry.