CLR_E_NOT_SUPPORTED (1) when creating a Bitmap?

The following code snippet generates this error.
Exception thrown: ‘System.NotSupportedException’ in GHIElectronics.TinyCLR.Drawing.dll
#### Exception System.NotSupportedException - CLR_E_NOT_SUPPORTED (1) ####
#### Message:
#### System.Drawing.Graphics::CreateSurface [IP: 0011] ####
#### System.Drawing.Graphics::.ctor [IP: 0006] ####
#### System.Drawing.Graphics::.ctor [IP: 0009] ####
#### System.Drawing.Bitmap::.ctor [IP: 000a] ####
#### CreateBitmapError.Program::Main [IP: 0008] ####

using System.Drawing;

namespace CreateBitmapError
{
    internal class Program
    {
        static void Main()
        {
            var B = new Bitmap(100, 100);
        }
    }
}

This sure seems very basic to me. It should be just allocating a memory buffer.
Attempting to run on a FEZ PICO using firmware 2.2.0.5000.

Any suggestions?

The Pico does not have support for an external display. The drawing functions are not implemented on the Pico. :weary:

What are you trying to achieve?

1 Like

Sorry to hear that.
I am trying to drive an eInk display with a Pico.
Since the Pico will not create a simple Bitmap buffer, I implemented my own set of functions to manage bitmaps.

2 Likes