image loading (direction)

2

Usually, all images load from top to bottom. But recently I came across this image, which loads from bottom to top:

enter image description here

(Original link here: http://www.ikorka.eu/ikorka.jpg)

Why is this so? What in general determines the direction of image loading?

DrStrangeLove

Posted 2011-03-13T15:04:04.757

Reputation: 1 381

Answers

2

The difference is that this file is not really what it seems.

> file ikorka.jpg
ikorka.jpg: PC bitmap, Windows 3.x format, 1362 x 1479 x 24

so although it is pretending to be a JPEG file it's in actual fact a Windows Bitmap file. Most browsers don't care about the extension, they just care about the data format, so it really doesn't matter (but it is very, very bad practice).

From the Bitmap file format at fileformat.info:

[Regarding file header structure] If Height is a positive number, then the image is a "bottom-up" bitmap with the origin in the lower-left corner. If Height is a negative number, then the image is a "top-down" bitmap with the origin in the upper-left corner.

So in answer to your question, what makes this image different to the others? It's a Windows Bitmap (masquerading as a JPEG) with a positive height setting which makes it a bottom-up bitmap.

Majenko

Posted 2011-03-13T15:04:04.757

Reputation: 29 007