Please see my comment to the question. Presently, .NET don't support such pixel formats. See, in particular,
PixelFormat Enumeration (System.Drawing.Imaging)[
^].
But you can support it by converting to one of the usable pixel formats, by mapping your color space to one the RGB spaces used in .NET, but you need to know how pixels are mapped to the color components.
However, it's possible that you told us not what you really meant to say: 1 byte per pixel per color (and optionally alpha) component, 24 or 32 bits per pixel. Then it would be an easy problem. To solve the problem, you can use
System.Drawing
. Here is how you can create a bitmap and fill it with pixels in required format:
Bitmap Constructor (Int32, Int32, PixelFormat) (System.Drawing)[
^],
Bitmap.LockBits Method (System.Drawing)[
^].
The code sample can be found on one of the MSDN pages on
LockBits
:
Bitmap.LockBits Method (Rectangle, ImageLockMode, PixelFormat) (System.Drawing)[
^].
—SA