Closed Bug 87819 Opened 23 years ago Closed 22 years ago

Transparent GIFs with transparency on all four sides render non-transparent portions against the left and top sides

Categories

(Core :: Graphics: ImageLib, defect, P2)

x86
All
defect

Tracking

()

RESOLVED FIXED
mozilla1.0.1

People

(Reporter: mikol, Assigned: pavlov)

References

()

Details

Attachments

(2 files, 2 obsolete files)

With some (but not all) transparent GIFs, mozilla renders the non-transparent
portions of the GIF against the top and left edges instead of twoards the center
of the GIF as it should. Please see the URL for an example.
Upon further investigation it appears that the sample GIFs provided at the URL
were created with the GIMP. The content layer rect does not extend beyond the
boundaries of the visible portion, which means that there is a a wide border of
pixels that are both transparent and not part of the content layer (as GIMP sees
it). If I set the content layer rect to be the same size as the image, the new
GIF will render the transparency as expected.
Could be related to Bug 86508

That bug tracks a similar symptom in the first frame of animating gifs.
Confirming on Linux, build 2001062606 and 0.9.1 Netscape 4.77 renders it correctly.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: 4xp
Confirming on build 2001-06-22-04, Win98

OS Should be changed to all.
Setting OS to ALL as per confirmation.
Keywords: correctness
OS: Linux → All
over to pavlov, image lib boy (er man).
Assignee: karnaze → pavlov
Component: Layout → ImageLib
Target Milestone: --- → Future
I was hoping that the patch for bug 86508 was going to fix this too, but it
appears it has not :(
The patch for Bug 86508 fixed the problem for animated gifs.  This one will fix
it for non-animated ones. :)
Status: NEW → ASSIGNED
Keywords: patch
Priority: -- → P2
Target Milestone: Future → mozilla1.0.1
Your patch fixes the problem for me on Linux.  My build is very crash-prone,
though.  I'll keep testing, no idea if this is related, probably not.

Pavlov, can you r= this?
Keywords: review
There were some seemingly random times that DrawScaledImage's sr.width would be
0, which caused a division by 0.  This updated patch fixes this.
Second patch also works for me, crashes are gone, though I still believe this is
unrelated.

Pavlov, can you give r= ?
Rev 2 didn't work well when the image was partially on the screen, and one
scrolled to see more of the image.
Attachment #80663 - Attachment is obsolete: true
Attachment #81308 - Attachment is obsolete: true
Third patch works fine here.  Somebody needs to have a look and review....
Attached image Another example
Happy face.  The face should start at 400x200, and extend to 414x214.

The gif is a one frame image, size 14x14, starting at 400x200.
Someone, anyone, please review this. Arron M, did you try the necessary steps to
get a review for this?  These URLs may help you:

http://www.mozilla.org/hacking/
http://www.mozilla.org/hacking/code-review-faq.html
http://www.mozilla.org/hacking/reviewers.html

Feel free to contact me for assistance.
Blocks: 123569
If you count buging pavlov (the only active imglib reviewer) every other day to
r=, yes.  But now he's gone for 2 (?) weeks, so I'm going to try it backwards
and see if I can get an SR first
Yes, bugging Pavlov counts.  Getting r= and sr= is the worst part of this whole
Mozilla thing.  I'm currently in the loop again with bug 46490 and boy, do you
need patience.  In mails always mention that you have already been ignored n
times, seems like few are willing to review the first time around.  Ask around
on IRC (#mozillazine, #mozilla) who else might be suitable to review your work
and try to get that sr= in parallel.  I wish you luck and patience, you will
need it.
Comment on attachment 82433 [details] [diff] [review]
Rev 3; Corrected for partial image draws

r=pavlov
Attachment #82433 - Flags: review+
Comment on attachment 82433 [details] [diff] [review]
Rev 3; Corrected for partial image draws

sr=tor
Attachment #82433 - Flags: superreview+
Blocks: 158715
Blocks: 37589
This will not make 1.1 (too close to branching time)
Blocks: 159293
checked in.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Keywords: review
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: