Soft question: row oriented image: top down or bot up?

When storing image in a row oriented (a row is contiguous in memory), is there a convention on whether the rows should be stored top down (y = 0 is top row) or bot up (y = 0 is bot row) ?

Top down is the norm, probably historically due to that being how most rasterized displays work.

2 Likes

See also Coordinate system in SVG. Of course, this doesn't need to match memory representation of pixel graphics, but I think going from top to bottom is by far the usual way.

A notable exception is Windows bmp.

1 Like

There isn't. Y=0=top is more common, except OpenGL and everything related to it where bitmaps are "flipped".