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(AnyBitmap, Boolean)
Turns a IronSoftware.Drawing.AnyBitmap 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(AnyBitmap Image, bool Rasterize = false)
Parameters
Type | Name | Description |
---|---|---|
IronSoftware.Drawing.AnyBitmap | Image | A non-null IronSoftware.Drawing.AnyBitmap |
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 |