Search Results for

    Show / Hide Table of Contents

    Class ImageUtilities

    Useful methods for working with images in PDF files.

    Inheritance
    System.Object
    ImageUtilities
    Namespace: IronPdf.Imaging
    Assembly: IronPdf.dll
    Syntax
    public static class ImageUtilities : Object

    Methods

    ImageToDataUri(Image, Boolean)

    Turns a System.Drawing.Image or System.Drawing.Bitmap into a DataUri which can used to embed the Image directly into an HTML document.

    Read standard https://en.wikipedia.org/wiki/Data_URI_scheme

    Declaration
    public static string ImageToDataUri(Image Image, bool Rasterize = false)
    Parameters
    Type Name Description
    System.Drawing.Image Image

    A non-null System.Drawing.Image or System.Drawing.Bitmap

    System.Boolean Rasterize

    Optional flag to flatten the image to raw pixels to increase compatibility with HTML (may affect PDF file size and rendering time)

    Returns
    Type Description
    System.String

    A data URL which can be used as the src attribute of an HTML <img tag

    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    Want to deploy IronPDF to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronPDF free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.