Comments (1)
I agree! Would be nice, if this library supports the toDataUrl
functionality out of the box. The workaround I am currently using goes like this:
index.html
<script>CanvasDataUrl = (canvas, dataType) => { return canvas.toDataURL(dataType); }</script>
MyCanvas.razor.cs
[Inject]
public IJSRuntime JSRuntime { get; set; }
protected BECanvasComponent _beRef;
string myCanvasDataUrl = "";
public async Task StoreCanvasImage()
{
this.myCanvasDataUrl = await this.JSRuntime.InvokeAsync<string>("CanvasDataUrl", this._beRef.CanvasReference, "image/jpeg");
}
from canvas.
Related Issues (20)
- Blazor-server canvas flickering HOT 2
- Could not find 'BlazorExtensions.Canvas2d.add' ('BlazorExtensions' was undefined) HOT 4
- Support for Blazor Canvas Extension in .NET MAUI? HOT 6
- Scaling error. Reset scale?
- WebGL: INVALID_OPERATION: drawArrays: no valid shader program in use
- Resizing the Canvas to fit Container HOT 4
- Can we have the published release with the globalCompositeOperation support
- How to place and Image inside of the Canvas HOT 1
- Just FYI - we have a "mega-fork" of this project with quite a different goal but updated to .net6 and newer ts/webpack
- Colors are misapplied in Blazor WebAssembly ASP.NET Core hosted app when there are multiple asysnc drawings.
- CreatePatternAsync HOT 1
- How to reset the Sketchpad
- Blazor WebAssembly in process runtime
- Unable to change the stroke color per rect.
- Future plans? HOT 2
- MeasureText have only width informations HOT 4
- UniformAsync
- CreateCanvas2D (non async) isn't working
- Mouse Events to NuGet
- BECanvasComponent could not be found 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 canvas.