Search Results for

    Show / Hide Table of Contents

    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
    System.Object
    ImageObject
    Implements
    IPdfImageObject
    IPdfDocumentObject
    IronSoftware.Abstractions.Pdf.IPdfDocumentObject
    IronSoftware.Abstractions.IDocumentObject
    IronSoftware.Abstractions.Pdf.IDocumentImageObject
    IronSoftware.Abstractions.Pdf.IBoundedPdfDocumentObject
    IronSoftware.Abstractions.IBounded
    IronSoftware.ITransformable
    System.ICloneable
    IronSoftware.Abstractions.IJsonSerializable
    Namespace: IronSoftware
    Assembly: IronPdf.dll
    Syntax
    public class ImageObject : Object, IPdfImageObject, IPdfDocumentObject, IPdfDocumentObject, IDocumentObject, IDocumentImageObject, IBoundedPdfDocumentObject, IBounded, ITransformable, ICloneable, IJsonSerializable
    Remarks

    Transformation Logic:

    • Scale & Translate (Incremental):

      These properties operate on a "Last Value Applied" basis relative to the object's original state.

      Setting Scale to (0.5, 0.5) twice will NOT result in a 0.25 scale.

      It effectively means "Make the object 50% of its original size".

      To shrink it further, you must calculate the new relative target (e.g., 0.25) and apply that.

    • Rotation (Absolute):

      Rotation is always absolute. Setting Rotation to 45 degrees sets the object to 45 degrees (Clockwise),

      regardless of its previous rotation. It does not add 45 degrees to the current angle.

    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

    Implements

    IPdfImageObject
    IPdfDocumentObject
    IronSoftware.Abstractions.Pdf.IPdfDocumentObject
    IronSoftware.Abstractions.IDocumentObject
    IronSoftware.Abstractions.Pdf.IDocumentImageObject
    IronSoftware.Abstractions.Pdf.IBoundedPdfDocumentObject
    IronSoftware.Abstractions.IBounded
    IronSoftware.ITransformable
    System.ICloneable
    IronSoftware.Abstractions.IJsonSerializable
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    IronPDF_for_dotnet_log2o
    Blue key in circleGet started for FREE
    No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet started for FREE
    The trial form was submitted successfully.
    Calendar in circleBook Free Live Demo
    No contact, no card details, no commitments Book a 30-minute, personal demo.
    Here's what to expect:

    A live demo of our product and its key features

    Get project specific feature recommendations

    All your questions are answered to make sure you have all the information you need. (No commitment whatsoever.)

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation
    Support Team Member 6 related to The C# PDF Library Support Team Member 14 related to The C# PDF Library Support Team Member 4 related to The C# PDF Library Support Team Member 2 related to The C# PDF Library
    Online 24/5
    Need help? Our sales team would be glad to help you.
    Try the Enterprise Trial
    ironpdf_for_dotnet_log2o
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    bullet_checkedNo credit card or account creation required
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    Blue key in circleNo credit card or account creation required
    Green Check in orange circle
    The trial form was submitted successfully.
    badge_greencheck_in_yellowcircle
    Thank you for starting a trial

    Please check your email for the trial license key.

    If you don’t receive an email, please start a live chat or email support@ironsoftware.com

    Install with NuGet
    View Licensing
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronPDF