Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.