VectSharp 2.6.1
A light library for C# vector graphics
|
Contains methods to render a Page to an Image. More...
Classes | |
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 Public Member Functions | |
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) |
Render 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... | |
static Image | SaveAsAnimatedGIF (this Animation animation, double scale=1, double frameRate=50, double durationScaling=1, GifColorTableMode colorTableMode=GifColorTableMode.Local) |
Saves the animation to an animated GIF. More... | |
static void | SaveAsAnimatedGIF (this Animation animation, Stream imageStream, double scale=1, double frameRate=50, double durationScaling=1, GifColorTableMode colorTableMode=GifColorTableMode.Local) |
Saves the animation to an animated GIF stream. More... | |
static void | SaveAsAnimatedGIF (this Animation animation, string fileName, double scale=1, double frameRate=50, double durationScaling=1, GifColorTableMode colorTableMode=GifColorTableMode.Local) |
Saves the animation to an animated GIF file. More... | |
static void | SaveAsAnimatedPNG (this Animation animation, Stream imageStream, double scale=1, double frameRate=60, double durationScaling=1, AnimatedPNG.InterframeCompression interframeCompression=AnimatedPNG.InterframeCompression.First) |
Saves the animation to a stream in animated PNG format. More... | |
static void | SaveAsAnimatedPNG (this Animation animation, string fileName, double scale=1, double frameRate=60, double durationScaling=1, AnimatedPNG.InterframeCompression interframeCompression=AnimatedPNG.InterframeCompression.First) |
Saves the animation to an animated PNG file. More... | |
Contains methods to render a Page to an Image.
Definition at line 1048 of file ImageSharpContext.cs.
|
static |
Rasterise a region of a Graphics object.
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. |
Definition at line 1280 of file ImageSharpContext.cs.
|
static |
Saves the animation to an animated GIF.
animation | The animation to export. |
scale | The scale at which the animation will be rendered. |
frameRate | The target frame rate of the animation, in frames-per-second (fps). This is capped by the animated GIF specification at 50 fps. |
durationScaling | A scaling factor that will be applied to all durations in the animation. Values greater than 1 slow down the animation, values smaller than 1 accelerate it. Note that this does not affect the frame rate of the animation. |
colorTableMode | Determines whether a single colour table should be used for the whole image, or if a different colour table should be used for each frame. |
Definition at line 1328 of file ImageSharpContext.cs.
|
static |
Saves the animation to an animated GIF stream.
animation | The animation to export. |
imageStream | The stream on which the animated GIF will be written. |
scale | The scale at which the animation will be rendered. |
frameRate | The target frame rate of the animation, in frames-per-second (fps). This is capped by the animated GIF specification at 50 fps. |
durationScaling | A scaling factor that will be applied to all durations in the animation. Values greater than 1 slow down the animation, values smaller than 1 accelerate it. Note that this does not affect the frame rate of the animation. |
colorTableMode | Determines whether a single colour table should be used for the whole image, or if a different colour table should be used for each frame. |
Definition at line 1387 of file ImageSharpContext.cs.
|
static |
Saves the animation to an animated GIF file.
animation | The animation to export. |
fileName | The output file to create. |
scale | The scale at which the animation will be rendered. |
frameRate | The target frame rate of the animation, in frames-per-second (fps). This is capped by the animated GIF specification at 50 fps. |
durationScaling | A scaling factor that will be applied to all durations in the animation. Values greater than 1 slow down the animation, values smaller than 1 accelerate it. Note that this does not affect the frame rate of the animation. |
colorTableMode | Determines whether a single colour table should be used for the whole image, or if a different colour table should be used for each frame. |
Definition at line 1403 of file ImageSharpContext.cs.
|
static |
Saves the animation to a stream in animated PNG format.
animation | The animation to export. |
imageStream | The stream on which the animated PNG will be written. |
scale | The scale at which the animation will be rendered. |
frameRate | The target frame rate of the animation, in frames-per-second (fps). This is capped by the animated PNG specification at 90 fps. |
durationScaling | A scaling factor that will be applied to all durations in the animation. Values greater than 1 slow down the animation, values smaller than 1 accelerate it. Note that this does not affect the frame rate of the animation. |
interframeCompression | The kind of compression that will be used to reduce file size. Note that if the animation has a transparent background, no compression can be performed, and the value of this parameter is ignored. |
Definition at line 1420 of file ImageSharpContext.cs.
|
static |
Saves the animation to an animated PNG file.
animation | The animation to export. |
fileName | The output file to create. |
scale | The scale at which the animation will be rendered. |
frameRate | The target frame rate of the animation, in frames-per-second (fps). This is capped by the animated PNG specification at 90 fps. |
durationScaling | A scaling factor that will be applied to all durations in the animation. Values greater than 1 slow down the animation, values smaller than 1 accelerate it. Note that this does not affect the frame rate of the animation. |
interframeCompression | The kind of compression that will be used to reduce file size. Note that if the animation has a transparent background, no compression can be performed, and the value of this parameter is ignored. |
Definition at line 1508 of file ImageSharpContext.cs.
|
static |
Render the page to an Image object.
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. |
Definition at line 1056 of file ImageSharpContext.cs.
|
static |
Render the page to an image stream.
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 1072 of file ImageSharpContext.cs.
|
static |
Render the page to an image file.
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 1130 of file ImageSharpContext.cs.
|
static |
Return the page to raw pixel data, in 32bpp RGBA format.
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. |
Definition at line 1243 of file ImageSharpContext.cs.
|
static |
Render the page to raw pixel data, in 32bpp RGBA format.
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. |
Definition at line 1200 of file ImageSharpContext.cs.