Is there any popular or most-reliable source that has say the top-10 image formats spec statistics? Or are virtually all formats top-to-bottom? I've run across at least one bottom-to-top and below the TGA info shows either-or, and I'm getting bogged down with multiple levels of flipping coordinate space, so I'm totally uncertain.
Here's the TGA reference, that describes a flag for screen origin:
http://www.paulbourke.net/dataformats/tga/
byte offset 17, bit 5 specifies if the image's pixels are laid out with origin being top-left or bottom-left. I don't know across general use of TGA if there is a typical standard origin across most image applications and libraries.
Considering PNG files, and checking the reference
http://www.w3.org/TR/PNG/#4Concepts.Sourceimage
4.1.b states PNG pixel scan lines are ordered top-to-bottom.
The goal of asking this question is better insight for writing procedural generated pixels into any arbitrary pre-stored image file after it has been loaded into memory.
As a side note, I'm not certain about the easiest way to describe this in graphics terminology. The layout of the pixels onto the screen relative to an origin, I'd personally call it the image pixel orientation, or pixel row order. Maybe there is no single best term.
Sadly, both are in common use today.
Windows BMP, for example, are bottom-up.
Even once loaded into memory, different APIs expect different formats. OpenFX, for example, is bottom-up as well.