Stb_image_writeSourcebuffer simply is an alias to a bigarray with c_layout. Two kind of pixel buffers are manipulated:
Content of an image with c channels of width w and height h is represented as a contiguous sequence of items such that:
c itemsw pixelsh linestype 'kind buffer = ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t constraint 'kind = ('a, 'b) Stdlib.Bigarray.kind