Resized images not always displayed correctly



17 years ago
9 years ago


(Reporter: trav, Assigned: pavlov)


Windows 98

Firefox Tracking Flags

(Not tracked)





17 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.1) Gecko/20020826
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.1) Gecko/20020826

Images sometimes are displayed incorrectly if the HTML code (in the IMG tag)
specifies that the image is to be displayed with dimensions different than those
of the actual image. As one example of the several obvious examples at the URL
I've listed, the image pocbear1b.jpg is a 325x220 pixel image, while the page is
displaying it at 196x132. Mozilla is inserting odd-colored artifacts in the
images when they are resized.

I realize technically this could be considered a problem with poor page design
and practice; but I see people do this all the time unfortunately so it seems it
needs to be fixed.

Reproducible: Always

Steps to Reproduce:
1. Open the Mozilla browser.
2. Go to
3. Toward the bottom of the page, observe the images that bracket the text "NEW
POT HUGGERS 1, 2and 3"

Actual Results:  
Some of the images look quite odd, with lots of artifacts. If you right-click
and "view image" you can see what it actually looks like.

Expected Results:  
The image should scale with the colors more-or-less intact.

This seems to be specific to Windows. I tested it with Mozilla 1.0.1, 1.1, and
1.2alpha1 - all display the same problem. Under Linux I tried Mozilla 1.0.1 and
the images looked fine. I've compared how Internet Explorer displays the images
- it doesn't have any issues with this apparently.

I have an ATI Rage Mobility M1 video card on a Dell Inspiron 3800. The pages are
being displayed in 24-bit color on an 1024x768 LCD panel.

This may not have been a problem with older versions of Mozilla. My wife reports
that "these pages used to look fine", which I realize is rather subjective and
probably not helpful to you in the least.

Comment 1

17 years ago
This bug seems related to ATI video card. It does not happen one my computer
with a voodoo 5500. I am fairly sure it is video card related because I have two
computer with the same specs, OS, and mozilla build: 2002092617 with the only
difference being a radeon 8500. :| doesnt work
ether. the pages is completely empty

amd xp 1.4/1.6
512mb sdr
xp pro
voodoo 5500 works/radeon 8500 doesnt work


Comment 2

16 years ago
I see it too, and I don't have an ATI card (mine's an STB Velocity 4400). An
exemplary test page is, with its mix of
resized and non-resized images. The resized ones (e.g., the trio of ape pictures
right under the "The Great Apes" heading) exhibit the corruption, but the
non-resized ones (e.g., the large chimp picture just below "Chimpanzees") don't.
The behavior I see is that, after scrolling, the image is partially redrawn in
bands, with the background showing through. Sometimes the un-redrawn band is the
entire picture.

Comment 3

16 years ago
I can confirm that this bug occurs on Mozilla 1.4a, latest nightly of Firebird,
0.5 of Firebird.

However, all is fine with Mozilla 1.0.2 is a good page for testing. Images are 150x150 and
displayed in a 100x100 frame on the homepage (news headlines). Clicking on one
opens the full article, where the full image size is displayed (150x150).

With anything Mozilla based newer than 1.0.2, images are either disappearing or
partially shown, and hiding them with another window or by scrolling will make
them disappear (right-click>show image does show that image loaded fine).

IMO, this should be critical, it has plagued Mozilla for an awfull long time,
and it renders the brand new and touted image resizing completly useless.

System is AXP1600+,256mb, ATI8500. Will try on a GFMX-equipped comp soon and
wimm report.

Comment 4

16 years ago
Ok, tested latest Firebird and mozilla 1.4a on another system, no problem -_-.
System description:
Celeron 900, GF2MX, 256mb, win98se (my 1st system is win2k BTW).
So there's something between ATI, Mozilla version > 1.0.2 and maybe OS....

Comment 5

16 years ago
I would deem this behaviour to be due to poor image resampling. My guess is that
Mozilla uses some sort of (poorly implemented) nearest neighbour algorithm. I
suggest this should be switched to linear interpolation -- it's still very fast
(hey, can Doom do it, so should Mozilla ;-) ) and looks a lot better. This
change should be implemented for all Mozilla automatic image resizing. If you
need (general resampling) sources for this, mail me.

Comment 6

15 years ago
On few of the suggested sites, WFM.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040121
build from source on Gentoo linux.
WFM, 2004-08-01-07 trunk Linux.  Is anyone still having a problem with
disappearing or partially shown images?
(the poor image quality mentioned in comment 5 is bug 98971)

Comment 8

15 years ago
(In reply to comment #7)
> WFM, 2004-08-01-07 trunk Linux.  Is anyone still having a problem with
> disappearing or partially shown images?
> (the poor image quality mentioned in comment 5 is bug 98971)

No. I have the same hardware I had when I saw the problem in earlier versions,
but in Mozilla 1.7 and Firefox 0.9.2, the problem doesn't appear.

Comment 9

15 years ago
I think this is Image: GFX. There's no layout problem here.

Marking WFM based on comment 8.
Last Resolved: 15 years ago
Component: Layout: Images → Image: GFX
Resolution: --- → WORKSFORME


9 years ago
Component: Image: Painting → Image: Painting
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.