Open Bug 224293 Opened 21 years ago Updated 2 years ago

Automatic Image Resizing Too Sensitive (scales images unnecessarily)

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

x86
All
defect

Tracking

()

People

(Reporter: bruppel1, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20031019 Firebird/0.7+ (aebrahim)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20031019 Firebird/0.7+ (aebrahim)

I think the Automatic Image Resizing feature is a good idea, but 95% of the
times that I see it in action, it kicks in when the image seems to not need
shrinking.  (the image is 97% of its original size).  In the example url,
clicking on an image brings up a window with the jpeg shrunk to ~97%, and when I
click to expand the image, it doesn't even expand enough to produce scrollbars
around edges of the window.  Shouldn't there be more criteria when mozilla
decides if it should resize an image?

Perhaps I am mistaken and there is some other bug, such as the image resizing is
mis-calculating image size.  See the images in the example URL.  I'm running at
a resolution of 1152x864.

Reproducible: Always

Steps to Reproduce:
1.Click on link to image which is slightly larger than the window

Actual Results:  
Image is shrunken to 97%.  Clicking to expand the image hardly creates a
difference, and doesn't even create scrollbars in the window.

Expected Results:  
Mozilla should only shrink an image if it is appreciably too big for the window.
 I think a minimum number of pixels beyond the window boundaries would be a good
idea.  Using percentages wouldn't scale well with large images.
verified Moz 1.5 final on WinXP Pro

severity -> minor
Severity: normal → minor
yeah, this seems to be a good idea
I think I should stress that this might be an example of Mozilla mis-calculating
the final image size.  It looks as though my examples are shrunk to give a
border around the image, and when the example images are expanded, they still
don't protrude beyond size of the window.  Ack, maybe this is a different bug
than what I have reported, as the images in my example, in fact, don't protrude
beyond the window borders at all.
On linux, too, so OS -> All
OS: Windows 2000 → All
(In reply to comment #3)
> It looks as though my examples are shrunk to give a
> border around the image

a margin is put around pages by default - something like 10px.  it takes this
into account when displaying automatically scaled down images, but maybe it
doesn't care about the margin if the image fits within a certain threshold at
full size.

there is definitly some mis-calculation going on here, tho.  on that first
Deep-sea batfish image on the example link, there is obviously a thin strip of
something visible on the far right side of the image (also visible on the
thumbnail).  when you click to make it full size, the image scales up just a bit
(from 97%), but then the strip isn't visible.  i assume pushed out beyond the
edge of the non-resizable window, BUT there's no horizontal scrollbar, as there
should be to see the entire image.

possibly related to:
bug 199395
bug 206589
Summary: Automatic Image Resizing Too Sensitive → Automatic Image Resizing Too Sensitive (scales images unnecessarily)
*** Bug 264495 has been marked as a duplicate of this bug. ***
miahz is correct to point out that the margins (8px on each side) are preventing
the images from displaying at full size. As the window is opened at 709 pixels
wide (and tall for those of you not using 800x600) this means it is 16 pixels
too narrow. As for the scrollbars, they have been disabled in that window.

On IE the image just gets cut off on the right.
*** Bug 261534 has been marked as a duplicate of this bug. ***
(In reply to comment #7)
> miahz is correct to point out that the margins (8px on each side) are
> preventing
> the images from displaying at full size. As the window is opened at 709 pixels
> wide (and tall for those of you not using 800x600) this means it is 16 pixels
> too narrow. As for the scrollbars, they have been disabled in that window.
> 
> On IE the image just gets cut off on the right.
> 

If both IE and gecko-based browsers have the margin, is this really a bug?  Anyone who wants a tightly-fitting window could just use an HTML image container doc that sets 0 margins...
Assignee: jdunn → nobody
QA Contact: layout.images
Product: Core → Core Graveyard
Product: Core Graveyard → Core
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.