In my program I try to read a color palette image's (FormatConvertedBitmap
with format Indexed4
) pixels using a WritableBitmap
.
The dimensions of the resulting image are 20 * 27 pixels.
The color palette is 16 colors, so each color takes a nibble and each byte carries two pixels.
However, in memory, WPF adds an additional DWORD to the end of each pixel row:
I'm not able to address particular pixels with this mismatch.
What BitmapSource property do I need to examine to be able to compute the correct stride of this image?