From 65609bf6858e8d31f733d61788b20b5804f168bf Mon Sep 17 00:00:00 2001 From: "H. Utku Maden" Date: Sun, 28 Jul 2024 11:33:12 +0300 Subject: [PATCH] Fix buffer size in QImageBuffer.cs --- Dashboard/Media/Color/ImageBuffer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dashboard/Media/Color/ImageBuffer.cs b/Dashboard/Media/Color/ImageBuffer.cs index 3987f8c..11a6d28 100644 --- a/Dashboard/Media/Color/ImageBuffer.cs +++ b/Dashboard/Media/Color/ImageBuffer.cs @@ -22,7 +22,7 @@ namespace Dashboard.Media.Color Height = height; Depth = depth; - buffer = new byte[width * height * depth]; + buffer = new byte[(long)width * height * depth * format.BytesPerPixel()]; } ~QImageBuffer() {