Closed
Bug 135579
Opened 24 years ago
Closed 24 years ago
Small interlaced PNG images are decoded incorrectly
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: jason1, Assigned: tor)
References
()
Details
Attachments
(1 file, 1 obsolete file)
|
1.63 KB,
patch
|
jud
:
approval+
|
Details | Diff | Splinter Review |
Certain small pixel sizes of interlaced PNG images are not displayed correctly.
Some of the pixels are displayed in the wrong colors (colors that appear
elsewhere in the image). For example, when Mozilla tries to display a 2-pixel
interlaced PNG having one red and one blue pixel, it makes both pixels blue.
The image sizes that don't work are:
(width x height) 1x2, 1x3, 1x4, 2x1, 2x2, 2x3, 2x4
I tested 8-bpp palette images and 24-bpp RGB images, with identical results. I
haven't tested other image types.
[build id: 2002040403]
Comment 1•24 years ago
|
||
Netscape 4.7x has similar problems with this test case. IE5.5 displays
it properly.
This needs to be resolved.
Glenn
Comment 2•24 years ago
|
||
Jason, what version of libpng did you use? There was a bug with narrow
interlaced PNGs that was fixed in libpng-1.0.9.
Glenn
| Reporter | ||
Comment 3•24 years ago
|
||
I created the test images with either libpng 1.2.1 or one of the 1.2.2 betas;
not sure which. I'm not 100.0% sure they are valid images, but most software
seems to be able to handle them.
I discovered the problem when investigating why the background on someone else's
web site didn't display consistently. It was using a 2-pixel PNG (apparently
created with ImageReady) as a background image, which I've copied here:
http://entropymine.com/jason/testbed/intltest/test1.png
(You have to look closely, as the pixels are similar in color.)
BTW, I've added a couple of screen shots to my test page, to show what I see in
Mozilla, and how I think it should be displayed.
Comment 4•24 years ago
|
||
I meant, which version of libpng did you use to build your Mozilla?
Glenn
Comment 5•24 years ago
|
||
I looked over the images with a few tools (pngcrush -v, imagemagick, od,
pngcheck -v) and there seems to be nothing wrong with them. Glenn
| Reporter | ||
Comment 6•24 years ago
|
||
I didn't build it myself. Recent Windows builds of Mozilla include a file named
"imgpng.dll" which contains the string "1.0.9" a few times, so that'd be my
guess as to the libpng version in use.
| Reporter | ||
Comment 7•24 years ago
|
||
Any chance of getting this bug confirmed sometime...?
Summary: Small interlaced PNG images displayed incorrectly → Small interlaced PNG images are decoded incorrectly
Comment 8•24 years ago
|
||
Confirmed under Linux with Mozilla 1.0 release; the results are identical to the
Windows screenshot, aside from the background (which is white in both
screenshots but cyan in Moz 1.0--presumably the older page used in the
screenshots didn't have the two-pixel image as a background). strings(1) on
components/libimgpng.so indicates it's using libpng 1.0.9.
W.r.t. comment #1, NN 4.x's problems are indeed similar but not identical; it
completely fails to show 7 of the images, and it has problems with some of the
4xN and Nx5 images. So this isn't a 4xp regression.
Opera 6.0 TP1 displays everything correctly.
Greg
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 98 → All
Comment 9•24 years ago
|
||
> Confirmed under Linux with Mozilla 1.0 release;
Also under Windows 95 running on Pentium/MMX
> the results are identical to the
> Windows screenshot, aside from the background (which is white in both
> screenshots but cyan in Moz 1.0--presumably the older page used in the
> screenshots didn't have the two-pixel image as a background
It's not supposed to be cyan. Under IE it's the vertically striped
red/green as in the box labelled "green", and the text is really ugly red,
black, and green due to interference patterns.
Would someone please build mozilla with libpng-1.2.3 and see if the problems
go away?
Has the problem been confirmed on a non-MMX platform?
Glenn
| Assignee | ||
Comment 10•24 years ago
|
||
With the 1.0.9 currently in the tree we don't enable the MMX code for
either windows or linux.
Compiling mozilla against libpng-1.2.3 fixes the problem. While I was
planning up updating moz's libpng in the trunk once the flury of 1.2.x
updates dies down, we can't do large code drops like that in the 1.0.x
branch. If you want it fixed there we'll need a minimal patch.
Comment 11•24 years ago
|
||
This patch upgrades pngpread.c from version 1.0.9 to 1.0.10, in which the
bug with loading small interlaced PNG files has been fixed.
| Assignee | ||
Comment 12•24 years ago
|
||
Attachment #87849 -
Attachment is obsolete: true
| Assignee | ||
Comment 13•24 years ago
|
||
rs=tor for a change that's been baking in libpng since 1.0.10 (March 2001).
| Assignee | ||
Comment 14•24 years ago
|
||
Checked into trunk.
Updated•24 years ago
|
Attachment #87852 -
Flags: approval+
Comment 15•24 years ago
|
||
please checkin to the 1.0.1 branch. once there, remove the "mozilla1.0.1+"
keyword and add the "fixed1.0.1" keyword.
Keywords: mozilla1.0.1+
| Assignee | ||
Comment 18•24 years ago
|
||
Fix in trunk/branch - closing.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 19•24 years ago
|
||
Verified fixed linux branch build 2002070907, win xp branch build 2002070908 and
Mac OS X branch build 2002070810
Keywords: fixed1.0.1 → verified1.0.1
Updated•20 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•