ImageInfo

Overview

ImageInfo is a type in Aspose.PDF FOSS for Go.

ImageInfo holds metadata about an image found on a page without decoding pixel data.

This type provides 4 methods for working with ImageInfo objects in Go programs. Available methods include: Extract, Remove, Replace, ReplaceFromStream. All public members are accessible to any Go application after installing the Aspose.PDF FOSS for Go package. Properties: BPC, ColorSpace, Format, Height, Inline, Name, and 5 more.

Properties

NameTypeAccessDescription
WidthintRead/WriteGets the width.
HeightintRead/WriteGets the height.
BPCintRead/WriteGets the bpc.
ColorSpaceImageColorSpaceRead/WriteGets the color space.
FormatImageFormatRead/WriteGets the format.
Xfloat64Read/WriteGets the x.
Yfloat64Read/WriteGets the y.
PageWidthfloat64Read/WriteGets the page width.
PageHeightfloat64Read/WriteGets the page height.
InlineboolRead/WriteGets the inline.
NamestringRead/WriteGets the name.

Methods

SignatureDescription
Extract()(*Image, error)Extract decodes the image and returns the full Image with pixel data.
Remove()errorRemove removes the image from the page.
Replace(path: string)errorReplace replaces the image data with a new image from a file.
ReplaceFromStream(r: io.Reader)errorReplaceFromStream replaces the image data with a new image from a reader.

See Also