Comments (3)
You can output a data-uri; an example of this is here. I haven't had the chance to work with Blazor so I don't know how it would work there but I assume similarly.
As for the PlatformNotSupportedException
: this may help:
... you can enable support for non-Windows platforms in .NET 6 by setting the
System.Drawing.EnableUnixSupport
runtime configuration switch to true in the runtimeconfig.json file.
runtimeconfig.template.json template file:
{ "configProperties": { "System.Drawing.EnableUnixSupport": true } }
[appname].runtimeconfig.json output file:
{ "runtimeOptions": { "configProperties": { "System.Drawing.EnableUnixSupport": true } } }
from nidenticon.
Update:
I tried this, from the examples in the docs page:
var g = new IdenticonGenerator();
var bitmap = g.Create("foo",);
Which fails with:
System.PlatformNotSupportedException: System.Drawing.Common is not supported on this platform.
from nidenticon.
Yes I figured out the data-uri bit, but unfortunately the failure occurs before that, when the code enters the System.Drawing
namespace.
Thanks for that workaround, though I doubt I'd use it if it's targetting Windows... but this bit got my attention:
It's around 30,000 lines of C code that's largely untested
😮😮😮
That made me laugh! Now I won't feel so bad when I don't write many tests - even MS is guilty!!! 😆
PS: if you ever decide to port to blazor, I'll be happy to help test it. :)
from nidenticon.
Related Issues (2)
- flat colors HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nidenticon.