The operations to save and export the icon are implemented as extension methods located in the Jdenticon namespace.
Before using Identicon the Jdenticon-net package needs to be added to the project. Use the NuGet Package Manager to add a reference.
PM> Install-Package Jdenticon-net
The following code illustrates how to use Jdenticon to generate an icon from a string and save it as a PNG image. Note that all save operations are implemented as extension methods, which means a using for the Jdenticon namespace is required.
using Jdenticon; // ... Identicon .FromValue("string to hash", size: 160) .SaveAsPng("test.png");
Identicon |
Creates an Identicon instance with the specified hash.
|
DefaultStyle |
Gets or sets the default style that will be used for all Identicon
instances where no explicit style has been specified.
| |
Hash |
Gets the hash that is used as base for this icon.
| |
IconGenerator |
Gets or sets the IconGenerator used to generate icons.
| |
Size |
Gets or sets the size of the icon.
| |
Style |
Gets or sets the style of the icon.
|
Draw(Renderer) |
Draws this icon using a specified renderer.
| |
Draw(Renderer, Rectangle) |
Draws this icon using a specified renderer.
| |
FromHash(Byte, Int32) |
Creates an Identicon instance from a specified hash.
| |
FromHash(String, Int32) |
Creates an Identicon instance from a hexadecimal hash string.
| |
FromValue |
Generates a hash for a specified value and creates an Identicon instance from the generated hash.
| |
ToString |
Gets a string representation of this Identicon.
|
Draw(Graphics) |
Draws an Identicon in a specified GDI drawing context at position (0, 0).
| |
Draw(DrawingContext) |
Draws an Identicon in a specified WPF drawing context at position (0, 0).
| |
Draw(Graphics, Rectangle) |
Draws an Identicon in a specified GDI drawing context.
| |
Draw(Graphics, Rectangle) |
Draws an Identicon in a specified GDI drawing context.
| |
Draw(DrawingContext, Rectangle) |
Draws an Identicon in a specified WPF drawing context.
| |
Draw(DrawingContext, Rect) |
Draws an Identicon in a specified WPF drawing context.
| |
SaveAsEmf |
Saves an Identicon as an Enhanced Metafile (EMF).
| |
SaveAsEmf(Stream) |
Saves an Identicon as an Enhanced Metafile (EMF).
| |
SaveAsEmf(String) |
Saves an Identicon as an Enhanced Metafile (EMF).
| |
SaveAsEmfAsync(Stream) |
Saves an Identicon as an Enhanced Metafile (EMF) asynchronously.
| |
SaveAsEmfAsync(String) |
Saves an Identicon as an Enhanced Metafile (EMF) asynchronously.
| |
SaveAsPng |
Saves an Identicon icon as a Portable Network Graphics (PNG) file.
| |
SaveAsPng(Stream) |
Saves an Identicon icon as a Portable Network Graphics (PNG) file.
| |
SaveAsPng(String) |
Saves an Identicon icon as a Portable Network Graphics (PNG) file.
| |
SaveAsPngAsync(Stream) |
Saves an Identicon icon as a Portable Network Graphics (PNG) file asynchronously.
| |
SaveAsPngAsync(String) |
Saves an Identicon icon as a Portable Network Graphics (PNG) file asynchronously.
| |
SaveAsSvg |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file.
| |
SaveAsSvg(TextWriter) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file.
| |
SaveAsSvg(Stream) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file.
| |
SaveAsSvg(String) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file.
| |
SaveAsSvg(Boolean) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file.
| |
SaveAsSvg(TextWriter, Boolean) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file.
| |
SaveAsSvg(Stream, Boolean) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file.
| |
SaveAsSvg(String, Boolean) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file.
| |
SaveAsSvgAsync(TextWriter) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file asynchronously.
| |
SaveAsSvgAsync(Stream) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file asynchronously.
| |
SaveAsSvgAsync(String) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file asynchronously.
| |
SaveAsSvgAsync(TextWriter, Boolean) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file asynchronously.
| |
SaveAsSvgAsync(Stream, Boolean) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file asynchronously.
| |
SaveAsSvgAsync(String, Boolean) |
Saves an Identicon icon as a Scalable Vector Graphics (SVG) file asynchronously.
| |
ToBitmap |
Renders an Identicon to a GDI Bitmap.
| |
ToSvg |
Renders an Identicon as a Scalable Vector Graphics (SVG) data string.
| |
ToSvg(Boolean) |
Renders an Identicon as a Scalable Vector Graphics (SVG) data string.
| |
ToVisual |
Renders an Identicon as a WPF Visual.
|