Class ImageObject
Represents an image object embedded within a PDF page.
This object allows you to modify the image's content, position, scale, and rotation. Transformations are applied immediately when a property is set.
Inheritance
Implements
Namespace: IronSoftware
Assembly: IronPdf.dll
Syntax
public class ImageObject : Object, IPdfImageObject, IPdfDocumentObject
ImageObject is the object IronPDF C# code works with for Iron Software API. It represents an image object embedded within a PDF page.
ImageObject matters when an application needs to configure or invoke Iron Software API from C# code. The class encapsulates the related options and behavior in a single object that is set up once and reused across render or processing calls. Typical scenarios include batch generation pipelines, templated document workflows, and integration with existing C# document services.
To use ImageObject, instantiate or obtain it from the relevant entry point in the IronPDF C# API. Key properties include BoundingBox, Client, DocumentId, Image. Assign options or invoke methods on the instance to configure or perform the operation. The image to PDF covers typical usage in C# end to end.
using IronPdf;
// Obtain ImageObject from the relevant entry point in the IronPDF API
void Configure(ImageObject instance)
{
var current = instance.BoundingBox;
instance.Clone();
}For the broader workflow, see the page orientation rotation guide in the IronPDF C# documentation. For broader context, the Iron Software API portion of the IronPDF C# API contains related types that work with ImageObject directly. ImageObject exposes additional members beyond those highlighted above; the reference tables on this page list the full set. In application code, treat ImageObject as a configured object that is constructed once and reused across operations rather than instantiated per call. Configuration is generally idempotent: assigning the same property value twice has the same effect as assigning it once. For diagnostic purposes, inspect the relevant ImageObject property after each operation to confirm the configured state. See the constructors, properties, and methods tables below for the complete API surface of ImageObject.
Fields
_Image
Declaration
protected IAnyImage _Image
Field Value
| Type | Description |
|---|---|
| IronSoftware.Abstractions.IAnyImage |
_Rotation
Declaration
protected double _Rotation
Field Value
| Type | Description |
|---|---|
| System.Double |
_Scale
Declaration
protected PointF _Scale
Field Value
| Type | Description |
|---|---|
| System.Drawing.PointF |
_Translate
Declaration
protected PointF _Translate
Field Value
| Type | Description |
|---|---|
| System.Drawing.PointF |
Properties
BoundingBox
Declaration
public RectangleF BoundingBox { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.RectangleF |
Client
Pdf client
Declaration
public IPdfClient Client { get; set; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.Pdfium.IPdfClient |
DocumentId
Declaration
public IDocumentId DocumentId { get; set; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.Abstractions.Pdf.IDocumentId |
Image
Declaration
public IAnyImage Image { get; set; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.Abstractions.IAnyImage |
ImageChanged
Flag indicating that the image has changed
Declaration
public bool ImageChanged { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Matrix
Declaration
public MatrixStruct Matrix { get; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.MatrixStruct |
ObjNum
Declaration
public uint ObjNum { get; set; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
PageIndex
Declaration
public uint PageIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
Rotation
Gets or sets the absolute rotation angle of the image in degrees.
Declaration
public double Rotation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double | A System.Double representing the rotation angle in degrees. Positive values rotate Clockwise. |
Remarks
Absolute Rotation: Unlike Scale/Translate, this value is absolute. If the image is currently at 90 degrees, setting this to 0 will reset it to upright.
Pivot: Rotation occurs around the bottom-left corner of the image's bounding box.
Scale
Gets or sets the scaling factor of the image relative to its original size.
Declaration
public PointF Scale { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.PointF | A System.Drawing.PointF where X and Y represent the horizontal and vertical scaling factors. Default is (1.0, 1.0). |
Remarks
Behavior: Setting this property updates the image size immediately.
Example:
image.Scale = new PointF(0.5f, 0.5f); This reduces the image to half width/height.
Warning: Setting Scale to 0.0 or extremely small values (near epsilon) is internally clamped to 1.0 or a safe minimum to prevent division-by-zero errors or disappearing objects.
Translate
Gets or sets the translation (position offset) of the image from its original location.
Declaration
public PointF Translate { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.PointF | A System.Drawing.PointF representing the delta X and delta Y in PDF user space units (usually points). |
Remarks
Behavior: This moves the image relative to its starting position found when the object was loaded.
Example:
image.Translate = new PointF(100f, 50f); This moves the image 100 points right and 50 points up
(PDF coordinate system usually originates at bottom-left).
ZOrder
Declaration
public RelativeZOrder ZOrder { get; set; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.Abstractions.RelativeZOrder |
ZPosition
Declaration
public long ZPosition { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
Methods
Clone()
Declaration
public object Clone()
Returns
| Type | Description |
|---|---|
| System.Object |
ToJson()
Declaration
public string ToJson()
Returns
| Type | Description |
|---|---|
| System.String |