Replies: 4 comments 4 replies
-
|
In your C# app, grayscale images will load faster, use less bandwidth, less memory and will be processed faster. |
Beta Was this translation helpful? Give feedback.
-
|
Beware of the cost of pixel transcoding. When you lock (and unlock) the framebuffer, there will be a transcoding copy made. See Avalonia/src/Avalonia.Base/Media/Imaging/WriteableBitmap.cs Lines 67 to 79 in 4e1b90b You may need to dip deeper and use Skia directly (and render via Avalonia's Skia leasing), but I'm not entirely sure if that supports the scenario efficiently either. |
Beta Was this translation helpful? Give feedback.
-
|
Reference: #20559 |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your help! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it true that the best way to use WriteableBitmap is to convert any image (even gray scale) to PixelFormat.Bgra8888?
I've asked 2 ai agents and they both told me about PixelFormat.Bgra8888. I couldn't find any proofs in the docs or issues.
Can you help me, please?
Beta Was this translation helpful? Give feedback.
All reactions