Using the following builds: Windows: 2000-03-15-06-m15-nb1b Mac: 2000-03-15-15-m15-nb1b Linux: 2000-03-15-12-m15-nb1b Open the attached file. In the file, there are two images. The images are a green leaf with a black border. One has width=150px and height=150px. The other is a larger image but is being resized through the use of CSS. The width=150px and the height=auto. Expected result: The two images should be the same size both with full borders (part of the image). Actual result: When the larger image is resized to the size of the smaller image (through the use of height:auto), the border (part of the image) is clipped on the top and right sides.
This problem does not happen using IE 5.0
This is an ImageLib problem when shrinking or enlarging images with borders. Nav4x renders the same way while IE does a better job. See the new HTML-only testcase that I'm going to attach. Changed the title to "Images with borders don't resize very well"
This looks like 2 different bugs to me. bug#1: The border is not calculated correctly when an image is resized. On NT, build from 03-16-00: the 100x100 image has no borders on top & right. the 150x150 image borders look ok. the 200x200 image borders are wider on the top & on the right. bug#2: The image aspect is wrong when scaling an image with borders. On NT with a tree from 03-16-00, the aspect looks fine to me. The image looks ok. The border has 2 sides missing (top & right). I'm not sure who deals with borders. The code is in different parts of layout. Eric, I'm reassigning to you since alot of the border stuff is related to CSS, since if its not yours, you will probably have a good idea who should get this. -P
Pierre is the CSS owner, so since he passed, I'm assuming the bug isn't his - I'll take a quick look to see if I can figure out who the owner should be...
Eric: Who draws the borders? -P
Back to Pam. The problem is not related to HTML or CSS, but in the way we're rendering the image itself. The border is not an HTML or CSS border, but is part of the image data. If you look at leaf.gif with a standard image viewer (xv), you'll see a image of a leaf on a white background with a two pixel black border all around the white background. The problem is that when scaling this image, while we do scale it to exactly the right size, we don't do a good job preserving this border. See the comments in the original bug for more information. Thanks!
Sorry. You're right. The border in this case is a part of the image. I'll try to get a brain transplant during lunch break. -P (also known as >duh< )
Moving to m17
Moving to m18
changing summary to reflect real bug. -pn
> The problem is that when scaling this image, while we do scale it > to exactly the right size, we don't do a good job preserving this border. No, it is 1px to big (sic!). See bug 69454. Adding dependency.
All pnunn bugs reassigned to Pav, who is taking over the imglib.