Following up on this question.
I've managed to extract pixel informations off a bitmap instance using Bitmap.LockBits. PixelFormat is Format48bppRbg which, based on my understanding and Peter's answer on the aforementioned question, should store each pixel's RGB color channels using two bytes for storage. The bytes's combined value should be equal to a number between 0 and 8192, representing an RBG channel intensity value. That value is obtained by passing both bytes to the BitConverter.ToUInt16 method.
So upon extracting pixel informations for the following 3 x 3 bitmap (magnified here for clarity):
I'm having first row of pixel channels going like this:
| Pixel color | Red intensity | Green intensity | Blue intensity |
|---|---|---|---|
| RED | 8192 | 0 | 0 |
| GREEN | 0 | 8192 | 0 |
| BLUE | 0 | 0 | 8192 |
So far so good.
On the second row, however, it goes like this:
| Pixel color | Red intensity | Green intensity | Blue intensity |
|---|---|---|---|
| WHITE | 8192 | 8192 | 8192 |
| GRAY (!) | 1768 (!) | 1768 (!) | 1768 (!) |
| BLACK | 0 | 0 | 0 |
The white and black pixel channel values make sense to me.
The gray, however, doesn't.
If you use any color picker on the gray pixel above, you should get a perfectly medium gray. In 24 bits color it should be the equivalent of (R: 128, G: 128, B: 128), or #808080 in hexadecimal form.
Then how come, in a Format48bppRpg pixel format, the channels intensity is way below the expected, middle 4096 value? Isn't this GDI+ based range of 0-8192 supposed to work like its 8 bits counterpart, with 0 being the lowest intensity and 8192 the highest? What am I missing here?
For reference, here is a screen capture from Visual Studio debugger showing the raw bytes indexes and values, with additional notes on the stride, channels positions and their extracted intensity value, up to the gray pixel:

