Open Bug 536881 Opened 16 years ago Updated 3 years ago

no error message when BMP-image height is larger than 65535 pixels

Categories

(Core :: Graphics: ImageLib, defect)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: andy.krug, Unassigned)

Details

Attachments

(4 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 if the width of a 24bit-windows-bitmap is larger than 65535 pixels (2^16) firefox prints an error message: The image "file:///.../NameOfPicture.bmp" cannot be displayed, because it contains errors. if the height of a 24bit-windows-bitmap is larger than 65535 pixels firefox shows a blank screen with the opportunity to zoom in the "picture". after "zooming" in, the screen stays blank. Reproducible: Always Steps to Reproduce: 1. create a 24bit-windows-bmp-image (height: >=65536 pixels, width:1 pixel, color: black) 2. save image 3. open it with firefox Actual Results: screen is blank, opportunity to "zoom" in the picture, if done, nothing changes, screen stays blank Expected Results: message: "The image "file:///.../NameOfPicture.bmp" cannot be displayed, because it contains errors." should appear (as if width of a picture is >=65536 pixels) if wanted i can send you four testpictures via e-mail: height:65535 pixels, width:1 pixel (o.k.) height:65536 pixels, width:1 pixel (blank screen) height:1 pixel, width:65535 pixels (o.k.) height:1 pixel, width:65536 pixels (error message) best regards, andreas
The error screen for width check http://mxr.mozilla.org/mozilla-central/source/modules/libpr0n/decoders/bmp/nsBMPDecoder.cpp#214 There is no height check as I see it
Similar behaviour of Firefox is given, if you create png-images (65535x1 pixels, 65536x1 pixels, 1x65535 pixels and 1x65536 pixels, color: black) instead of bmp-images. In this case everything works fine up to 65535 pixels, but if the png's are at least 65536 pixels in height or width, the screen (normal or zoom view) stays blank.
Summary: no error message when image height is larger than 65535 pixels → no error message when BMP-image height is larger than 65535 pixels
Reporter, are you still seeing this issue with Firefox 3.6.13 or later in safe mode? If not, please close. These links can help you in your testing. http://support.mozilla.com/kb/Safe+Mode http://support.mozilla.com/kb/Managing+profiles You can also try to reproduce in Firefox 4 Beta 8 or later, there are many improvements in the new version, http://www.mozilla.com/en-US/firefox/all-beta.html
Whiteboard: [CLOSEME 2011-1-30]
(In reply to comment #3) > Reporter, are you still seeing this issue with Firefox 3.6.13 or later in safe > mode? If not, please close. This "behaviour" of Firefox not printing an error message still exists in version 3.6.13
Whiteboard: [CLOSEME 2011-1-30]
Version: unspecified → 3.6 Branch
Andreas, I suggest you generate those four test files mentioned in your bug description and attach them to this bug. I don't know the size limits here, but if you zip the BMP files they will shrink significantly since there are mostly zeroes in them. There are at least 7 different kind of BMP headers in use - which in turn can use like 6 different compression modes. Thus, if someone would like to take a look at this bug it's less confusing if he or she looks at exactly the same file as you and others.
Attached image height 1 width 65535
Attached image height 1 width 65536
Attached image height 65535 width 1
Attached image height 65536 width 1
Why should there be any error messages at all? Shouldn't Firefox be able to show the images correctly and without error messages in first place? Are the huge images broken according to some specification? I can see a change in the behavior since this bug got reported, by http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=db38e530c170&tochange=7a2802932585. When clicking the sometimes invisible image (zooming to 1:1) there is now a broken image icon for height 65536 width 1 images. So images which by some reason are considered to be broken by the huge width generates an error message on the screen, but images which by some reason are considered to be broken by the huge height generates a broken image icon. Inconsistent! But basically the problem (whatever the exact problem is) still exists in the current trunk: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120227 Firefox/13.0a1
Component: General → ImageLib
OS: Windows 2000 → All
Product: Firefox → Core
QA Contact: general → imagelib
Hardware: x86 → All
Version: 3.6 Branch → Trunk
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: