Contains methods to render a Page to an Image.
More...
|
class | UnknownFormatException |
| The exception that is raised when the output file format is not specified and the file name does not have an extension corresponding to a known file format. More...
|
|
|
static Image< SixLabors.ImageSharp.PixelFormats.Rgba32 > | SaveAsImage (this Page page, double scale=1) |
| Render the page to an Image object. More...
|
|
static void | SaveAsImage (this Page page, Stream imageStream, OutputFormats outputFormat, double scale=1) |
| Render the page to an image stream. More...
|
|
static void | SaveAsImage (this Page page, string fileName, OutputFormats? outputFormat=null, double scale=1) |
| Render the page to an image file. More...
|
|
static DisposableIntPtr | SaveAsRawBytes (this Page pag, out int width, out int height, out int totalSize, double scale=1) |
| Return the page to raw pixel data, in 32bpp RGBA format. More...
|
|
static byte[] | SaveAsRawBytes (this Page pag, out int width, out int height, double scale=1) |
| Return the page to raw pixel data, in 32bpp RGBA format. More...
|
|
static RasterImage | Rasterise (this Graphics graphics, Rectangle region, double scale, bool interpolate) |
| Rasterise a region of a Graphics object. More...
|
|
Contains methods to render a Page to an Image.
Definition at line 1001 of file ImageSharpContext.cs.
◆ Rasterise()
static RasterImage VectSharp.Raster.ImageSharp.ImageSharpContextInterpreter.Rasterise |
( |
this Graphics |
graphics, |
|
|
Rectangle |
region, |
|
|
double |
scale, |
|
|
bool |
interpolate |
|
) |
| |
|
static |
Rasterise a region of a Graphics object.
- Parameters
-
graphics | The Graphics object that will be rasterised. |
region | The region of the graphics that will be rasterised. |
scale | The scale at which the image will be rendered. |
interpolate | Whether the resulting image should be interpolated or not when it is drawn on another Graphics surface. |
- Returns
- A RasterImage containing the rasterised graphics.
Definition at line 1233 of file ImageSharpContext.cs.
◆ SaveAsImage() [1/3]
static Image<SixLabors.ImageSharp.PixelFormats.Rgba32> VectSharp.Raster.ImageSharp.ImageSharpContextInterpreter.SaveAsImage |
( |
this Page |
page, |
|
|
double |
scale = 1 |
|
) |
| |
|
static |
Render the page to an Image object.
- Parameters
-
page | The Page to render. |
scale | The scale to be used when rasterising the page. This will determine the width and height of the Image. |
- Returns
- An Image containing the rasterised page.
Definition at line 1009 of file ImageSharpContext.cs.
◆ SaveAsImage() [2/3]
static void VectSharp.Raster.ImageSharp.ImageSharpContextInterpreter.SaveAsImage |
( |
this Page |
page, |
|
|
Stream |
imageStream, |
|
|
OutputFormats |
outputFormat, |
|
|
double |
scale = 1 |
|
) |
| |
|
static |
Render the page to an image stream.
- Parameters
-
page | The Page to render. |
imageStream | The Stream on which the image data will be written. |
outputFormat | The format of the image that will be created. |
scale | The scale to be used when rasterising the page. This will determine the width and height of the image. |
Definition at line 1025 of file ImageSharpContext.cs.
◆ SaveAsImage() [3/3]
static void VectSharp.Raster.ImageSharp.ImageSharpContextInterpreter.SaveAsImage |
( |
this Page |
page, |
|
|
string |
fileName, |
|
|
OutputFormats? |
outputFormat = null , |
|
|
double |
scale = 1 |
|
) |
| |
|
static |
Render the page to an image file.
- Parameters
-
page | The Page to render. |
fileName | The path of the file where the image will be saved. |
outputFormat | The format of the image that will be created. If this is null (the default), the format is desumed from the extension of the file. |
scale | The scale to be used when rasterising the page. This will determine the width and height of the image. |
Definition at line 1083 of file ImageSharpContext.cs.
◆ SaveAsRawBytes() [1/2]
static byte [] VectSharp.Raster.ImageSharp.ImageSharpContextInterpreter.SaveAsRawBytes |
( |
this Page |
pag, |
|
|
out int |
width, |
|
|
out int |
height, |
|
|
double |
scale = 1 |
|
) |
| |
|
static |
Return the page to raw pixel data, in 32bpp RGBA format.
- Parameters
-
pag | The Page to render. |
scale | The scale to be used when rasterising the page. This will determine the width and height of the image. |
width | The width of the rendered image. |
height | The height of the rendered image. |
- Returns
- A byte array containing the raw pixel data.
Definition at line 1196 of file ImageSharpContext.cs.
◆ SaveAsRawBytes() [2/2]
static DisposableIntPtr VectSharp.Raster.ImageSharp.ImageSharpContextInterpreter.SaveAsRawBytes |
( |
this Page |
pag, |
|
|
out int |
width, |
|
|
out int |
height, |
|
|
out int |
totalSize, |
|
|
double |
scale = 1 |
|
) |
| |
|
static |
Return the page to raw pixel data, in 32bpp RGBA format.
- Parameters
-
pag | The Page to render. |
scale | The scale to be used when rasterising the page. This will determine the width and height of the image. |
width | The width of the rendered image. |
height | The height of the rendered image. |
totalSize | The size in bytes of the raw pixel data. |
- Returns
- A DisposableIntPtr containing a pointer to the raw pixel data, stored in unmanaged memory. Dispose this object to release the unmanaged memory.
Definition at line 1153 of file ImageSharpContext.cs.
The documentation for this class was generated from the following file: