Example: In case of 8x8 matrix

8, 8,

128, 128, 128, 128, 128, 128, 128, 128, 255, 128, 128, 128, 128, 128, 128, 128, 255, 255, 128, 128, 128, 128, 128, 128,

255, 255, 255, 128, 128, 128, 128, 128,

8 elements

255, 255, 255, 255, 128, 128, 128, 128, 255, 255, 255, 255, 255, 128, 128, 128, 255, 255, 255, 255, 255, 255, 128, 128, 255, 255, 255, 255, 255, 255, 255, 128,

8 elements

73