VectSharp
2.2.1
A light library for C# vector graphics
|
A RasterImage created from a stream. More...
Public Member Functions | |
RasterImageStream (Stream imageStream, InputFileTypes fileType, int pageNumber=0, double scale=1, bool alpha=true, bool interpolate=true) | |
Creates a new RasterImage from the specified stream. More... | |
RasterImageStream (IntPtr imageAddress, long imageLength, InputFileTypes fileType, int pageNumber=0, double scale=1, bool alpha=true, bool interpolate=true) | |
Creates a new RasterImage from the specified stream. 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 stream.
Definition at line 69 of file RasterImages.cs.
VectSharp.MuPDFUtils.RasterImageStream.RasterImageStream | ( | Stream | imageStream, |
InputFileTypes | fileType, | ||
int | pageNumber = 0 , |
||
double | scale = 1 , |
||
bool | alpha = true , |
||
bool | interpolate = true |
||
) |
Creates a new RasterImage from the specified stream.
imageStream | The stream containing the image data. |
fileType | The type of the image contained in the stream. |
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 80 of file RasterImages.cs.
VectSharp.MuPDFUtils.RasterImageStream.RasterImageStream | ( | IntPtr | imageAddress, |
long | imageLength, | ||
InputFileTypes | fileType, | ||
int | pageNumber = 0 , |
||
double | scale = 1 , |
||
bool | alpha = true , |
||
bool | interpolate = true |
||
) |
Creates a new RasterImage from the specified stream.
imageAddress | A pointer to the address where the image data is contained. |
imageLength | The length in bytes of the image data. |
fileType | The type of the image contained in the stream. |
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 148 of file RasterImages.cs.