Closed sn4k3 closed 3 years ago
Is this WPF or Avalonia ? You can probably change image quality when zooming, to speed things up, but this will result in worse rendering quality and faster speeds.
Is this WPF or Avalonia ? You can probably change image quality when zooming, to speed things up, but this will result in worse rendering quality and faster speeds.
It's Avalonia, the bigger the image the worst performance is, even to pan... Also image distorcing pixels, they get blury, this make this component not so good to use since it kill the user interaction. Back on WinForms i use https://github.com/cyotek/Cyotek.Windows.Forms.ImageBox which no matter the resolution, renders (pan/zoom) are always instants (no delay) and never distorce pixels. Since WPF is made for graphics i never expected that to be worst than a WinForm bitmap zoom/pan component :(
I'm attaching a test image if you want give it a try, for me it's laggy to zoom and pan, with blur edges/pixels
@sn4k3 Please take a look at proposed solution here https://github.com/AvaloniaUI/Avalonia/issues/2849
For anyone looking for a solution, you have to add the following lines to your program.cs file in Avalonia
Increase MaxGpuResourceSizeBytes to fit your needs
For anyone looking for a solution, you have to add the following lines to your program.cs file in Avalonia
Increase MaxGpuResourceSizeBytes to fit your needs
A big thanks to you for MaxGpuResourceSizeBytes trick!
Have done a simple test and loaded a 2560x1440 black and white image, the pan and zoom gets very slow as it zoom in more, also image gets blury at high zoom levels. Is there anything i can add to get better performance?