# Why is pixel 0,0 at the top left of some formats and bottom left of others?

It seems that every image format (jpeg, png, tiff, bmp, jp2000...) doesn't place their origin at the same corner.

Do you know where I could find some info about this differences?

I can only say that PNG and JPEG are different.

• Are you asking "why is pixel 0,0 at the top left of some formats and bottom left of others?" If so, the short answer is probably that a) some formats simply mimic the way raster scanning for displays (particularly CRTs) is performed - the HW reads teh pixel data in memory in increasing address order and sends to the display from top row to bottom row, and left to right within each row. For b) I suspect some formats wanted to mimic how humans draw graphs, with (0,0) at the bottom left and the Y-axis going up the screen. – Simon F Oct 24 '18 at 8:40
• It is exactly what I wanted to ask... I take your proposal of title. jpg seems to be the only one different from other formats (tiff, png, jp2000, bmp...). – Sandburg Oct 24 '18 at 10:23
• According to en.wikipedia.org/wiki/BMP_file_format#Pixel_array_(bitmap_data) BMPs are also bottom to top. – Simon F Oct 24 '18 at 13:52
• There has to be some standard for this. I don't know why I personally feel top left to be (0,0) and bottom right as (200,200). Perhaps, due to Khan Academy's usage of processing.js – MisterGeeky Oct 24 '18 at 17:00
• MIT Scratch has a similar co-ordinate system. So, my guess is that format developers worked in different graphic environments that influenced their decision on where to place origin. I feel left corner positions appropriate because it helps people stick to positive numbers and also LTR progression (ie, 0<1<2<3). Negative numbers take one more bit to store sometimes, or you have do some weird number inversion (ie, compliment). All in all, LOGO taught kids to move from center to different directions, assuming each new position as starting point, I feel that's where a lot of people got intuition. – MisterGeeky Oct 24 '18 at 17:05