Replies: 2 comments 6 replies
-
You are encoding the image and that probably also takes some time. What are you doing with the byte array that you are returning? And ImageMagick focuses more on quality and less on performance. |
Beta Was this translation helpful? Give feedback.
1 reply
-
This project also has a build in |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am trying to make a very simple blazor maui hybrid app, that would take a picture load it, and adjust the brightness and see it change in real time.
With hd (720p) pictures it works without any issues, but after I bump up the resolution to 4k it becomes a slideshow and I can't even begin to test 8k (8k is the limit I need).
This is the method, it takes around 300ms to process, which is quick, but not quick enough for real time adjustment.
I noticed that it uses my IGPU instead of dGPU (the IGPU is integrated with ryzen 7700x), and the dGPU is rx 6800 XT
But even when using iGPU it uses around 5-10% of it (I found this out, by opening task manager and dragging the slider to adjust brightness really fast). Also without GPU it takes around 600ms. So it's an improvement but not a huge one.
The code to show the image is:
this line takes more than 100ms
using (var image = new MagickImage(inputStream))
so does this
await image.WriteAsync(outputStream, MagickFormat.Jpeg);
I refactored the code, so MagickImage is loaded only once, so I managed to improve the performance quite a bit, but I am not sure, how to improve on WriteAsync
so I assume, this is not reliant on gpu, but maybe there is something that can be done ?
I suppose my main question is how to improve performance of the action.
I suppose it might even be different issue, so I would like someone to advice.
Beta Was this translation helpful? Give feedback.
All reactions