If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

need better sizing (smaller) of one pixel lines

RESOLVED WORKSFORME

Status

()

Core
ImageLib
P3
normal
RESOLVED WORKSFORME
18 years ago
6 years ago

People

(Reporter: Christine Hoffman, Unassigned)

Tracking

Trunk
Future
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [imglib])

Attachments

(4 attachments)

(Reporter)

Description

18 years ago
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.
(Reporter)

Comment 1

18 years ago
Created attachment 6575 [details]
testcase to demonstrate problem
(Reporter)

Comment 2

18 years ago
Created attachment 6576 [details]
larger image
(Reporter)

Comment 3

18 years ago
Created attachment 6577 [details]
smaller image
(Reporter)

Updated

18 years ago
Keywords: css1
(Reporter)

Comment 4

18 years ago
This problem does not happen using IE 5.0

Comment 5

18 years ago
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"
Assignee: pierre → pnunn
Component: Style System → ImageLib
QA Contact: chrisd → elig
Summary: CSS height: auto is clipping part of the image → Images with borders don't resize very well

Comment 6

18 years ago
Created attachment 6594 [details]
HTML-only testcase

Comment 7

18 years ago
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
Assignee: pnunn → pollmann

Comment 8

18 years ago
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...

Comment 9

18 years ago
Eric:
Who draws the borders? 
-P

Comment 10

18 years ago
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!
Assignee: pollmann → pnunn
Keywords: css1

Comment 11

18 years ago
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< )
Status: NEW → ASSIGNED

Updated

18 years ago
Target Milestone: M15

Comment 12

18 years ago
Moving to m17
Target Milestone: M15 → M17

Comment 13

18 years ago
Moving to m18
Target Milestone: M17 → M18

Updated

18 years ago
Target Milestone: M18 → Future

Comment 14

17 years ago
changing summary to reflect real bug.
-pn
Summary: Images with borders don't resize very well → need better sizing (smaller) of one pixel lines

Updated

17 years ago
QA Contact: elig → tpreston

Updated

17 years ago
Blocks: 66964
> 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.

Depends on: 69454

Comment 16

17 years ago
All pnunn bugs reassigned to Pav, who is taking over
the imglib.
Assignee: pnunn → pavlov
Status: ASSIGNED → NEW

Updated

17 years ago
Whiteboard: [imglib]

Updated

11 years ago
Assignee: pavlov → nobody
QA Contact: tpreston → imagelib
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.