- byte *pixels; /* left top pixel, there are at least sizeof(uns)
- unsed bytes after the buffer (possible optimizations) */
- u32 cols; /* number of columns */
- u32 rows; /* number of rows */
- u32 pixel_size; /* size of pixel (1, 2, 3 or 4) */
- u32 row_size; /* scanline size in bytes */
- u32 image_size; /* rows * row_size */
- u32 flags; /* enum image_flag */
+ byte *pixels; /* aligned top left pixel, there are at least sizeof(uns)
+ unused bytes after the buffer (possible optimizations) */
+ uns cols; /* number of columns */
+ uns rows; /* number of rows */
+ uns channels; /* number of color channels including the alpha channel */
+ uns pixel_size; /* size of pixel in bytes (1, 2, 3 or 4) */
+ uns row_size; /* scanline size in bytes */
+ uns row_pixels_size; /* scanline size in bytes excluding rows gaps */
+ uns image_size; /* rows * row_size */
+ uns flags; /* enum image_flag */