ImagePlacement

ImagePlacement

Overview

ImagePlacement is a class in Aspose.PDF FOSS for .NET.

Represents an image placement found on a PDF page — the position, size, and resolution of an image XObject as it appears on the page (after CTM transformation).

This class provides 4 methods for working with ImagePlacement objects in .NET programs. Available methods include: Hide, Replace, Save. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: CompositingParameters, Image, Matrix, Operator, Page, Rectangle, and 2 more.

Properties

NameTypeAccessDescription
RectangleRectangleReadThe bounding rectangle of the image on the page (in page coordinates).
ResolutionResolutionReadThe resolution (DPI) of the image at this placement.
PagePageReadThe page on which this image placement was found.
MatrixMatrixReadThe transformation matrix (CTM) at the point where the image was drawn.
ImageXImage?ReadThe underlying image XObject for this placement.
OperatorOperator?ReadThe content-stream operator that drew this image (typically Do).
RotationfloatReadRotation (in degrees) extracted from the placement matrix.
CompositingParametersCompositingParametersReadCompositing state at the point the image was drawn (alpha + blend mode).

Methods

SignatureDescription
Hide()Hide this image placement on the page.
Replace(image: Stream)Replace this image placement’s content with image.
Save(stream: Stream)Write the decoded image bytes to stream.
Save(stream: Stream, format: System.Drawing.Imaging.ImageFormat)Write the decoded image bytes to stream as format.

See Also