Framebuffer -> Image
Markus Forrer
21
Reputation points
I am implementing a Phyton tool new in C#. The Phyton tool converts a framebuffer of a monochrome LCD display 240x128 into an image as follows:
image = QImage(buffer, LcdWidth, LcdHeight, QImage.Format_Grayscale8)
In my C# tool I tried it like this:
WriteableBitmap writeableBitmap = new WriteableBitmap(pixelWidth, pixelHeight, 72, 72, PixelFormats.Gray8, null);
writeableBitmap.WritePixels(new Int32Rect(0, 0, (int)writeableBitmap.Width, (int)writeableBitmap.Height), buffer, 1, 1);
Unfortunately, I don't get anywhere with this approach.
Thank you for any hints.
Developer technologies | Windows Presentation Foundation
Developer technologies | Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Sign in to answer