VectSharp  2.2.1
A light library for C# vector graphics
VectSharp.MuPDFUtils.RasterImageFile Class Reference

A RasterImage created from a file. More...

Inheritance diagram for VectSharp.MuPDFUtils.RasterImageFile:

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...
 
- Public Member Functions inherited from VectSharp.RasterImage
 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

- Properties inherited from VectSharp.RasterImage
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...
 

Detailed Description

A RasterImage created from a file.

Definition at line 28 of file RasterImages.cs.

Constructor & Destructor Documentation

◆ RasterImageFile()

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.

Parameters
fileNameThe path to the file containing the image.
pageNumberThe 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.
scaleThe scale factor at which to render the image.
alphaA boolean value indicating whether transparency (alpha) data from the image should be preserved or not.
interpolateA boolean value indicating whether the image should be interpolated when it is resized or not.

Definition at line 38 of file RasterImages.cs.


The documentation for this class was generated from the following file: