Parameters
- buffer
- The row-major image buffer. Each bpp bytes represent one pixel.
- columns
- The number of columns in the image (width of the image).
- rows
- The number of rows in the image (height of the image).
- bpp
- The number of bytes per one pixel. Should be between 1 and 4.