[Solved] What would be the dimensions if we convert the Bitmap to a 2D array?


  1. Stride is usually reported in bytes, not pixels.
  2. Each pixel is 4 bytes (32 bits).
  3. This means that your offset or padding will be 0 (2048 bytes – 512*4 bytes).

Each row of your bitmap will be 512 * 4 = 2018 bytes, and there will be 512 rows. This means that it is simply a case of copying each sequential 2048 bytes of your 1D byte array into each row of the 2D array.

solved What would be the dimensions if we convert the Bitmap to a 2D array?