dmester / jdenticon-net Goto Github PK
View Code? Open in Web Editor NEW.NET library for generating identicons. Running on .NET Core and other .NET Standard compatible platforms.
Home Page: https://jdenticon.com
License: MIT License
.NET library for generating identicons. Running on .NET Core and other .NET Standard compatible platforms.
Home Page: https://jdenticon.com
License: MIT License
Or create a tag helper for asp.net core if the intention is to still keep compatibility with older versions of Asp.Net Mvc.
Any plans to implement a version for .Net core 2.0/.Net Standard 1.6?
Hi,
Great library! I realy like it and use it all over my app.
But I notice sometimes rendering artifacts that appear on some kinds of shapes. Here are samples (I hope github won't be compressing the image. click it to view full size):
Here is the code I use to generate images:
const int size = 128;
const int value = 0x5D503474; // the value below the samples in the pic above.
Identicon icon = Identicon.FromValue(value, size);
icon.Style.BackColor = Color.Transparent; // the darkgray background in samples is just a WPF window background.
icon.Style.Padding = 0f;
Then i just convert it to bitmap image to be able to display on window:
using (var stream = icon.SaveAsPng())
{
var bitmapImage = new BitmapImage();
bitmapImage.BeginInit();
bitmapImage.CacheOption = BitmapCacheOption.OnLoad;
bitmapImage.StreamSource = stream;
bitmapImage.EndInit();
bitmapImage.Freeze();
return bitmapImage;
}
Does someone know how to use this in blazor wasm?
Ideally, to generate the image and insert it into the DOM, without an intermediate image file.
Depending on Bitmap makes the Bitmap extension unavailable for .net core projects. Please consider replacing it with another alternative as seen here:
https://blogs.msdn.microsoft.com/dotnet/2017/01/19/net-core-image-processing/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.