0
votes

I have a Blazor (webAssembly) app that needs to upload photos. Most of these are just pictures of documents that don't need the 2+mb size that a camera/phone take. In testing I can easy reduce the file size to ~100kb without issue. I would like to resize these images before uploading to an API for processing, but since I'm using blazor webassembly I cannot figure out the most efficient way to handle this. I just need something simple, but since System.Drawing is not supported for resizing or other solutions work server side, looking for any guidance.

Thanks

1

1 Answers

0
votes

Edit: I just reread and noticed Web Assembly. I have never used that. Sorry to post if this doesn't work in WASM. Leaving this up in case it helps someone using Blazor Server.

You can reference System.Drawing in Blazor.

My Nuget package DataJuggler.PixelDatabase has a reference to Nuget package System.Drawing.Common.

enter image description here

Have you tried adding that?

My site PixelDatabase.Net is a Blazor site, and it uses my Nuget package, which has a reference to:

using System.Drawing;
using System.Drawing.Imaging;

Have you tried adding the Nuget package?