mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Updated to work with the new RGB.NET rendering
This commit is contained in:
1 parent
93a29eac52
commit
e58c0f20bb
21 files changed
+609
-668
No files matched your search
@@ -52,22 +52,22 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
|
||||
{
|
||||
Execute.PostToUIThread(() =>
|
||||
{
|
||||
if (e.BitmapBrush?.Bitmap == null || e.BitmapBrush.Bitmap.Pixels.Length == 0)
|
||||
if (e.Texture.Bitmap.Pixels.Length == 0)
|
||||
return;
|
||||
|
||||
SKImageInfo bitmapInfo = e.BitmapBrush.Bitmap.Info;
|
||||
SKImageInfo bitmapInfo = e.Texture.Bitmap.Info;
|
||||
|
||||
if (!(CurrentFrame is WriteableBitmap writeableBitmap) ||
|
||||
writeableBitmap.Width != bitmapInfo.Width ||
|
||||
writeableBitmap.Height != bitmapInfo.Height)
|
||||
{
|
||||
CurrentFrame = e.BitmapBrush.Bitmap.ToWriteableBitmap();
|
||||
CurrentFrame = e.Texture.Bitmap.ToWriteableBitmap();
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
using (SKImage skiaImage = SKImage.FromPixels(e.BitmapBrush.Bitmap.PeekPixels()))
|
||||
using (SKImage skiaImage = SKImage.FromPixels(e.Texture.Bitmap.PeekPixels()))
|
||||
{
|
||||
SKImageInfo info = new(skiaImage.Width, skiaImage.Height);
|
||||
writeableBitmap.Lock();
|
||||
|
||||
Reference in new issue
Block a user