Asked by:
image editing and drawing NuGet libraries inside Blazor?

Question
-
User887623398 posted
Hello,
Is it possible to use image editing and drawing NuGet libraries inside Blazor?
For example:
https://products.aspose.com/imaging/net
If not, is there another way?
thanks,
Saeed
Saturday, November 28, 2020 12:58 AM
All replies
-
User475983607 posted
Have you done any research? Have you tried reading the ASPOSE documentation or contacting ASPOSE support? What version of Blazor? Server? WASM? Do you have any code to share? Can you explain what image editing features you need?
Saturday, November 28, 2020 1:37 AM -
User887623398 posted
There is no project yet. I want to start it. I prefer server blazor.
I want a library or component to do simple visual manipulating. For example, bring visual objects to front or behind, transform, translate, crop
and draw simple objects like squares, circle,s, and color it.
I started to learn react, but if Blazor can do the job why using react!
Saturday, November 28, 2020 4:05 PM -
User475983607 posted
There is no project yet. I want to start it. I prefer server blazor.
I want a library or component to do simple visual manipulating. For example, bring visual objects to front or behind, transform, translate, crop
and draw simple objects like squares, circle,s, and color it.
I started to learn react, but if Blazor can do the job why using react!
So you've done no research or tried to create a proof of concept? I would start by reading the ASPOSE documentation and building a demo to see if the library fits your needs.
Saturday, November 28, 2020 4:56 PM -
User887623398 posted
I have done the research. But my main question is just can blazor have this ability or I should use javascript. Or a custom Ui like Telerik.
Saturday, November 28, 2020 5:44 PM -
User475983607 posted
I have done the research. But my main question is just can blazor have this ability or I should use javascript. Or a custom Ui like Telerik.Blazor uses JavaScript interop to execute JavaScript functions; https://docs.microsoft.com/en-us/aspnet/core/blazor/call-javascript-from-dotnet?view=aspnetcore-5.0
The community cannot comment on what framework you should use. It is up to you to do the research and create a proof of concept. Pick the framework you like best.
Saturday, November 28, 2020 7:35 PM -
User887623398 posted
I knew this. I'm curious if Blazor WASM can do the job with .net libraries instead of javascript.
I know there are many libraries in javascript for this task. Also, there are many graphic editor UI components.Saturday, November 28, 2020 8:09 PM -
User475983607 posted
I knew this. I'm curious if Blazor WASM can do the job with .net libraries instead of javascript.
I know there are many libraries in javascript for this task. Also, there are many graphic editor UI components.Have you tried Google? Have you tried anything?
Anyway, this was the first item listed in my Google search. Does it fit your needs?
https://www.reddit.com/r/Blazor/comments/g932ks/image_edit_with_blazor_client_and_imagesharp/
Saturday, November 28, 2020 10:04 PM -
User-474980206 posted
I knew this. I'm curious if Blazor WASM can do the job with .net libraries instead of javascript.
I know there are many libraries in javascript for this task. Also, there are many graphic editor UI components.it depends. a graphic / image editing program has two components, a UI and graphics engine. in browser based application you need a local graphics library, because passing images from client to server is too slow.
one approach is two graphic libraries, on the client one where you edit a low res image, and a server one, that edits the high res version. the client sent all graphic command to the server an it keeps its version in sync. with clients support more memory, this is not so common.
in browser graphic application, a canvas is used to display the image. the UI elements like object selection, lasso's, etc are drawn on the canvas. Typically the tools are outside the canvas, but can be drawn in the canvas. Th UI converts mouse, and keyboard commands in graphic commands, which update the canvas.
it is perfectly possible to write a WASM graphics application, the issue with writing one in Blazor is performance. Currently C# WASM performance is generally much slower than native javascript. For a WASM graphics application you should use C/C++, Rust or Swift to write the graphics engine. Currently there is no thread or GC support in WASM. this means you should use a heap language for performance.
As a WASM graphic application can not access the dom or the canvas, the UI is typically written in javascript. Blazor has a generic javascript interface that allows send events to the WASM and rending html back, so the UI could be written in Blazor with minimum javascript required.
As your questions are rather naive, I suspect you should just pick a working graphics library (with UI).
Monday, November 30, 2020 4:39 PM -
User-2054057000 posted
Blazor uses the power of .NET and so image editing is possible with it. You can start adding any NuGet package of your choice in your blazor app and then start working on it. See the NuGet search on Image editing packages - https://www.nuget.org/packages?q=image+editing
Moreover if you are just beginning with Blazor then check Blazor First App from scratch.
It will be more wiser if you start with some package with blazor and then if you get problems building your image processing codes then open a new thread about that problem. This will help people to assist you in a better manner.
Saturday, December 5, 2020 6:21 PM -
User887623398 posted
I have done one project with blazor server. On there I learned many things.
I know blazor can make the image editor. But speed is the most factor.
Are you referring to blazor server or wasm? Can you please explain more if you can?
Saturday, December 5, 2020 9:34 PM -
User-2054057000 posted
I suggest you to use Blazor Server because WASM is not as much powerful right now. More over Web Assembly is not supported in all browsers.
Sunday, December 6, 2020 11:33 AM