Class PdfImage
A raster image that can be drawn on a PDF page. Supports JPEG (pass-through) and PNG (decoded + re-compressed with FlateDecode).
Implements
Inherited Members
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public sealed class PdfImage : IDisposable
Properties
PixelHeight
Height in pixels.
Declaration
public int PixelHeight { get; }
Property Value
| Type | Description |
|---|---|
| int |
PixelWidth
Width in pixels.
Declaration
public int PixelWidth { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
Dispose()
Releases resources used by the image. No unmanaged resources are held; byte arrays are managed by the garbage collector.
Declaration
public void Dispose()
Load(Stream)
Load an image from a stream (JPEG or PNG).
Declaration
public static PdfImage Load(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream |
Returns
| Type | Description |
|---|---|
| PdfImage |
Load(string)
Load an image from a file path (JPEG or PNG).
Declaration
public static PdfImage Load(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path |
Returns
| Type | Description |
|---|---|
| PdfImage |