Html5CanvasOptions Class
The Html5 Canvas file format creation options.
Inheritance Hierarchy
SystemObject
  Aspose.ImagingDisposableObject
    Aspose.ImagingImageOptionsBase
      Aspose.Imaging.ImageOptionsHtml5CanvasOptions

Namespace: Aspose.Imaging.ImageOptions
Assembly: Aspose.Imaging (in Aspose.Imaging.dll) Version: 21.04
Syntax
public class Html5CanvasOptions : ImageOptionsBase

The Html5CanvasOptions type exposes the following members.

Constructors
  NameDescription
Public methodHtml5CanvasOptions
Initializes a new instance of the Html5CanvasOptions class
Properties
  NameDescription
Public propertyCode exampleBufferSizeHint
Gets or sets the buffer size hint which is defined max allowed size for all internal buffers.
(Inherited from ImageOptionsBase.)
Public propertyCanvasTagId
Gets or sets the canvas tag identifier.
Public propertyDisposed
Gets a value indicating whether this instance is disposed.
(Inherited from DisposableObject.)
Public propertyEncoding
Gets or sets the encoding.
Public propertyFullFrame
Gets or sets a value indicating whether [full frame].
(Inherited from ImageOptionsBase.)
Public propertyFullHtmlPage
Gets or sets a value indicating whether the full HTML page should be generated.
Public propertyMultiPageOptions
The multipage options
(Inherited from ImageOptionsBase.)
Public propertyCode examplePalette
Gets or sets the color palette.
(Inherited from ImageOptionsBase.)
Public propertyCode exampleProgressEventHandler
Gets or sets the progress event handler.
(Inherited from ImageOptionsBase.)
Public propertyCode exampleResolutionSettings
Gets or sets the resolution settings.
(Inherited from ImageOptionsBase.)
Public propertySource
Gets or sets the source to create image in.
(Inherited from ImageOptionsBase.)
Public propertyVectorRasterizationOptions
Gets or sets the vector rasterization options.
(Inherited from ImageOptionsBase.)
Public propertyXmpData
Gets or sets the XMP metadata container.
(Inherited from ImageOptionsBase.)
Methods
  NameDescription
Public methodClone
Clones this instance.
(Inherited from ImageOptionsBase.)
Public methodCode exampleDispose
Disposes the current instance.
(Inherited from DisposableObject.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize (Inherited from DisposableObject.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodReleaseManagedResources
Releases the managed resources. Make sure no unmanaged resources are released here, since they may have been already released.
(Inherited from ImageOptionsBase.)
Protected methodReleaseUnmanagedResources
Releases the unmanaged resources. Make sure no managed resources are released here, since they may have been already released.
(Inherited from DisposableObject.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodVerifyNotDisposed
Verifies that the current instance is not disposed.
(Inherited from DisposableObject.)
Fields
  NameDescription
Protected fieldxmpData
XMP metadata of image.
(Inherited from ImageOptionsBase.)
Examples
Any vector image (SVG, WMF, CMX, etc.) can be used as a source for your Canvas images. The following code creates a simple Canvas image.
[C#]

using (var image = Image.Load(@"Sample.svg"))
{
    image.Save(@"Canvas.html", new Html5CanvasOptions
    {
        VectorRasterizationOptions = new SvgRasterizationOptions()
    });
}
Examples
You can embed more than one Canvas image within HTML page or update already exsiting page. In order to do that you need to export only the Canvas tag.
[C#]

using (var image = Image.Load(@"Sample.svg"))
{
    image.Save(@"Canvas.html", new Html5CanvasOptions
    {
        VectorRasterizationOptions = new SvgRasterizationOptions(),
        FullHtmlPage = false
    });
}
See Also