Closed Bug 179296 Opened 22 years ago Closed 22 years ago

[BMP] support images with negative height (stored top-to-bottom)

Categories

(Core :: Graphics: ImageLib, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Biesinger, Assigned: Biesinger)

Details

Attachments

(2 files, 1 obsolete file)

the bmp code should support top-to-bottom BMP images.

They are indicated by a negative width.

eog and gqview support this, probably many other programs as well.
this image was taken from jason summer's test suite (referenced from bug 18502,
at least) and was slightly modified to have a negative height.

It should look upside-down on mozilla.
Attached patch patch (obsolete) — Splinter Review
Comment on attachment 105862 [details] [diff] [review]
patch

Just as a side note (not needed for this bug), if I read my BMP specs correctly
BMPINFOHEADER.width should also be a PRInt32 (and we should abort on negative
width)
Attachment #105862 - Flags: review?(paper) → review+
Attached patch patch v2Splinter Review
very well... now width is signed as well
Attachment #105862 - Attachment is obsolete: true
Attachment #105980 - Flags: review?(paper) → review+
Attachment #105980 - Flags: superreview?(tor)
Comment on attachment 105980 [details] [diff] [review]
patch v2

Small nit: I would have made both the ?: statements test the same condition.

sr=tor
Attachment #105980 - Flags: superreview?(tor) → superreview+
fixed
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: