VectSharp
2.2.1
A light library for C# vector graphics
|
A RasterImage created from a file. More...
Public Member Functions | |
RasterImageFile (string fileName, int pageNumber=0, double scale=1, bool alpha=true, bool interpolate=true) | |
Creates a new RasterImage from the specified file. More... | |
![]() | |
RasterImage (IntPtr pixelData, int width, int height, bool hasAlpha, bool interpolate) | |
Creates a new RasterImage instance from the specified pixel data in RGB or RGBA format. More... | |
RasterImage (ref DisposableIntPtr pixelData, int width, int height, bool hasAlpha, bool interpolate) | |
Creates a new RasterImage instance from the specified pixel data in RGB or RGBA format. More... | |
RasterImage (byte[] data, int width, int height, PixelFormats pixelFormat, bool interpolate) | |
Creates a new RasterImage instance copying the specified pixel data. More... | |
void | ClearPNGCache () |
Disposes the PNGStream. Also useful if is is necessary to regenerate it, e.g. because the underlying image pixel data has changed. More... | |
void | Dispose () |
Additional Inherited Members | |
![]() | |
IntPtr | ImageDataAddress [get] |
The memory address of the image pixel data. More... | |
IDisposable | DataHolder [get] |
An IDisposable that will be disposed when the image is disposed. More... | |
string | Id [get] |
A univocal identifier for this image. More... | |
bool | HasAlpha [get] |
Determines whether the image has an alpha channel. More... | |
int | Width [get] |
The width in pixels of the image. More... | |
int | Height [get] |
The height in pixels of the image. More... | |
bool | Interpolate [get] |
Determines whether the image should be interpolated when it is resized. More... | |
MemoryStream | PNGStream [get] |
Contains a representation of the image in PNG format. Generated at the first access and cached until the image is disposed. More... | |
A RasterImage created from a file.
Definition at line 28 of file RasterImages.cs.
VectSharp.MuPDFUtils.RasterImageFile.RasterImageFile | ( | string | fileName, |
int | pageNumber = 0 , |
||
double | scale = 1 , |
||
bool | alpha = true , |
||
bool | interpolate = true |
||
) |
Creates a new RasterImage from the specified file.
fileName | The path to the file containing the image. |
pageNumber | The number of the page in the file from which the image should be created, starting at 0. Only useful for multi-page formats, such as PDF. |
scale | The scale factor at which to render the image. |
alpha | A boolean value indicating whether transparency (alpha) data from the image should be preserved or not. |
interpolate | A boolean value indicating whether the image should be interpolated when it is resized or not. |
Definition at line 38 of file RasterImages.cs.