Closed Bug 75558 Opened 23 years ago Closed 21 years ago

Layered PNG alpha transparency scaling problems

Categories

(Core :: Graphics: ImageLib, defect)

x86
Windows 95
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 150881
mozilla1.0.1

People

(Reporter: MozillaUser, Assigned: pavlov)

References

Details

(Whiteboard: [imglib])

Attachments

(5 files)

(build 2001040904 on Windows 95)
When a PNG image with an alpha transparency mask is scaled to a size other than
its original size, the alpha mask is scaled wrong. This bug has been present
since the new ImageLib was checked in.

testcase on the way...
okay. Look at the attached testcases. The non-stretched one works perfectly. tre
bonan! However, when you move the streched ones over the background image, you
see it suddenly go all pixelated. Also note what happens if the stretched image
goes off the right side of the screen. its background becomes black. this does
not happen to the non-stretched image.
Blocks: 66967
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [imglib]
nice!  
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
*** Bug 80153 has been marked as a duplicate of this bug. ***
on linux nb 2001052021 the stretched PNGs don't show at all. It's like the PNG
is completly transparent!
regression right?

Not sure how related is.. but FYI: bug 82007 have examples of moving an scaled 
PNG alpha+mask image over other image.. 
going back over some of my pages that i *know* have worked in the past I've got
an extreme case of this pixelation effect happening here, where i have a few
copies of the same stretched image moving around on separate layers:
http://www.placenamehere.com/libraryDoodles/20010325.01.html

here's a screen grab from the most recent nighly (Mozilla/5.0 (Windows; U;
Windows NT 5.0; en-US; rv:0.9+) Gecko/20010524):
http://www.placenamehere.com/Mozilla/layered_png_moz.png

and here's an similar example, but with non stretched images... works just fine:
http://www.placenamehere.com/libraryDoodles/20010325.05.html

(sorry if this is redundant info, but i started gathering things together before
i hit the query page, figured it couldn't hurt)
*** Bug 84980 has been marked as a duplicate of this bug. ***
*** Bug 82007 has been marked as a duplicate of this bug. ***
A small comment.

Since every PNG related (however remotly) bug seems to get marked as duplicates
of this one, mayby the initial description should be changed ?

Though I have to ask why on earth the old funtioning imageliberary was replaced
with this "new & improved" massivly buggy one ?
It doesn't just mess up PNG transparancy (which was working greate) but also
compleatly breakes MNGs (the don't even SHOW UP!!).

Wouldn't it be wise to back it out and put the old stuff back in until the new
liberary is fixed in general, especially since the next NS6 relese will be based
on 0.9.1 / 0.9.2 (?).
Seems very unnessecary to put out a new NS6 to the general public with broken
image support when it has been working for so long before ... 
As I understand it, the old imagelib had reached its limits, and could not be
improved upon. Perhaps imagelib2 was rolled out too soon, but dont worry. Once
its fixed it really will be better.

Anyway, I originally filed this bug for a very specific symptom, as illustrated
by the attached testcase
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=30429

The description should NOT be morphed to cover a wider range of PNG problems,
and if any unrelated PNG bugs have been wrongly DUPed they must be REOPENED.

bug 80153 is definately NOT a dup
bug 84980 is definately NOT a dup
but bug 82007 probably IS a dup (and comtains a great test-case of the same symptom)

Could someone with the appropriate privledges please unDUP bug 80153 and bug 84980 ?

Thanks for drawing attention to this, Sauron.
"As I understand it, the old imagelib had reached its limits, and could not be
improved upon. Perhaps imagelib2 was rolled out too soon, but dont worry. Once
its fixed it really will be better."

I don't have any lack of faith in that the guys working on the new image lib
will get it right. They seem pretty knowledgeable about things anyway =).
I also understand that sometimes you need to breake stuff to get it function
better in the future.
The problem is more of a timeing issue, NS6 releases come every 6 months tops.
To have PNG partially and MNG totally broken for the next 6+ months in the
"public" relese seems a bit unnessecary, when it has been working so well for
almost a year now.

/ Stefan Huszics
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 
(you can query for this string to delete spam or retrieve the list of bugs I've 
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Nominating for 1.0

Also, I tested this on Linux, and it doesnt happen there. Only a problem on
windows it seems.
Keywords: mozilla1.0
I just tested on Windows, and the testcase shows up correctly, with no
pixelation behind the stretched images.  This appears to be fixed.
Confirming that my example (comment 10) is now working as well (win2k):

Screen shot from 3/1/02 nightly:
http://placenamehere.com/Mozilla/layered_png_moz2.png
On build 2002030208 On Windows 98 this bug is still present. The url in comment
#10 doesnt work either.
I cannot reproduce this bug on build 2002032708 under WinXP
Everything seems to work as it should
May be my question's stupid but, in so far as the bug seems reproducible in
20020408 (W98), is there no way to go back to the 0.9.8 implementation that
works ? It's really annoying to have such a bug that wasn't present before.
And can someone confirm that 125581 and 125629 are duplicates, because my
english is really as bad as you can see.
:^(
Thanks.
Fabrice: Actually, this has been broken for much longer than 0.9.8. This bug has
been present ever since the new ImgLib landed... and there is absolutley no
chance of revering back to the old one. it had WAY more problems than the new one.

Also, neither bug 125581 nor bug 125629 is a duplicate of this one (although
possibly they might be publicates of each other). Those bugs both cover issues
with using PNG files as backgrounds. This bug covers transparency on PNG images
that have been scaled to a different size than their normal size.
Build 2002041203.  I still can't reproduce this, and haven't been able to since
2002-03-02.  Perhaps it's fixed in one case, but depending on hardware/drivers,
it takes a different path.  I'm on an nVidia GeForce 1 SDR, 32-bit color, 28.32
drivers.

Fabrice, what hardware/drivers and bitdepth are you using? (CC'ing you so you'll
see this)
I've tried with my W98/ATI (16 & 32 bits) and my Mandrake at home, my
W98SE/NVidia (16&32) and my W2000/NVidia (16&32) at work. Mozilla's versions are
4 different between 0.9.9 release and 11/04 build. I've always got the bug. But
I didn't with the 0.9.8 one. The 3rd configuration is a clean one with the 11/04
build.
For exeample, what do you see here : http://www.chez.com/fabricebonny/openweb/ ?
What I've got : http://www.chez.com/fabricebonny/openweb/screenshot.jpg.
In fact, now, PNG are no longer scaled and are simple backgrounds. So it
concerns one of the 2 other bugs. I was trying to scale them because of the
background bug. Have another try, Fabrice !
Thanks.
I see that to, but it doesn't fit the description of this bug.  That's probably
bug 125629.
This bug is about an unwanted mosaic effect seen behind a scaled up PNG image
with an alpha channel.
burpmaster: which version of Windows are you using? As far as I can tell, this
is only a problem on 95/98 ... 2000/XP seem to be okay.
Oh, I'm on Windows 2000.  I know that Windows 2000 supports hardware 2D blitting
with alpha blending (and perhaps even an alpha channel), but 9x does not.  Is
Mozilla taking a hardware route on Win2k and a software route on 9x?

If so, why isn't this blazing fast?  I can set a window to be partially
transparent, and turn on "Show window contents while dragging," and the motion
is smoothe enough to cause tearing as it exceeds my monitor's refresh rate
(60Hz).  At least the testcase with more stretching shouldn't be slower than
with less stretching.

Is anyone still seeing this bug in the latest build? (Fabrice was reporting a
different problem)
The 2 attachments (strecthed and extremely stretched) still create pixelisation
with RC1 (2002041306) on W98.
About my problem, I've changed the code. First, I've tried a simple background
in a <div> (with CSS) and the png doesn't repeat correctly. So I've tried a
stretched "background" (with <img>) and got scaling problem because I've got
another background on the <body>. Then, I go back to the first try (the one that
you saw). And now, I'm sitting between 2 bug and waiting for the first to be fixed.
:-(
Same thing with 2002041512 (W98).
It appears to actually refresh correctly (like when it's moved by the script),
but when the image is first loaded, it pixelates everything behind it.

Reload this a couple times, and you should see it.
Under Mozilla 1.1b/Windows 95 I am not seeing any "pixellation" when I move
the stretched images around.  The background does turn black when part of a
stretched image is offscreen to the right or bottom.

Glenn
Oops, correction.  I *do* see the pixellation of the *background* when I move
the stretched foreground image over it.  It is as though the compositing is
happening before the result is magnified.

Glenn
pav, please update the target milestone
pav doesn't read bugmail
Needs retesting, as it worksforme, 2003040808, W2K.
Can probably be closed.
Build 2003041408 on Windows 98. The problem still occurs. This has been fixed on
Windows 2000 for some time now. Updating summary to indicate that this is a 9X
only problem (has anybody tried this with Windows ME?)

I was not able to test on Windows 95 with today's build because of bug 201990
Summary: PNG alpha transparency scaling problems. → PNG alpha transparency scaling problems (Win95/Win98 only)
I can still reproduce on Windows 2000, it's just a bit more difficult.

Keep reloading "testcase without script" and it will eventually happen.  When
the ghost image loads after the mozilla.org logo, some of the time the
pixelation will occur.  Any refreshing of the image or movement of it by a
script will remove the pixelation.  I suspect the problem occurs only during an
incremental refresh while the image is still loading.  That doesn't always get a
chance to happen.
Summary: PNG alpha transparency scaling problems (Win95/Win98 only) → PNG alpha transparency scaling problems (Win95/Win98 mostly)
Got in on Windows XP after refreshing a couple times.  20030426.
Summary: PNG alpha transparency scaling problems (Win95/Win98 mostly) → Layered PNG alpha transparency scaling problems
I get this bug every single time I try any of the testcases, running Moz 1.5
(latest stable at this writing) under Windows 2000.

Shouldn't this be tagged a more severe bug than just "normal"? This practically
puts us with WORSE png-"support" than IE (using the .htc-fix of course), and we
really like to complain over IE's lack of png-support, right? :-)
Still seeing the effect with Moz-1.4 and with FB-0.7 on Win95.
dupe of bug 150881? marking dependency for now
Depends on: 150881
MNG and JNG also exhibit the problem.  GIF doesn't.  See
http://mngzilla.sourceforge.net/bug75558/ which is a reduced test
case.  The image is a simple green square with a square transparent
hole.  The background image appears pixelated.

From the description of bug #150881, that does appear to be a dupe of
this one.
Fixed by the patch in 150881.


*** This bug has been marked as a duplicate of 150881 ***
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: