Closed Bug 367275 Opened 18 years ago Closed 18 years ago

download manager file folder icon is black

Categories

(Core :: Graphics: ImageLib, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: aja+bugzilla, Assigned: alfredkayser)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070117 Minefield/3.0a2pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070117 Minefield/3.0a2pre

the file folder icon is showing up black, instead of its normal color

Reproducible: Always

Steps to Reproduce:
1. install a recent minefield hourly (e.g. 2007011711)
2. download a file
3. note color of the file folder icon in download manager
Actual Results:  
black file folder icon in download manager

Expected Results:  
normally-colored file folder icon in download manager

likely a regression from bug 360000
Blocks: 360000
Version: unspecified → Trunk
FYI: Win XP/SP2's "Display" setting "Color quality" is set to "32-bit".
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070117 Minefield/3.0a2pre ID:2007011711 [cairo]
confirmed
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Note, this is not a CVS patch (today I don't have access to CVS).
So may be some else can do make it into a CVS patch and apply.

The bug was caused by premultiplying also the 32-bit pixels with the ICO has no transparancy set.
Attachment #251893 - Flags: review?
Attachment #251893 - Flags: review? → review?(pavlov)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070117 Minefield/3.0a2pre

Confirmed
Only do premultiplication when the 32bit ico really has alpha.
We can only know for sure that the alpha channel has really alpha data after scanning the whole image. 

So, this fix makes it so that SetPixel doesn't do premultiplication,
but SetImageData does this when mHaveAlpha is true.
Note, the 'premultiplication' function has been copied from libpixman.
Assignee: nobody → alfredkayser
Attachment #251893 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #251962 - Flags: review?(pavlov)
Attachment #251893 - Flags: review?(pavlov)
Component: Download Manager → ImageLib
Flags: review?(pavlov)
Product: Firefox → Core
QA Contact: download.manager → imagelib
Attachment #251962 - Flags: review?(pavlov)
Thanks for resetting the flags on that attachment, because it reminded me that I included the v2 patch with my most recent build to test that patch and then proceeded to completely forget that I'd done so.

Anyway, the v2 patch works fine for win32. The icons in the download manager look nice and normal again.
Attachment #251962 - Flags: review?(pavlov) → review+
Whiteboard: [checkin needed]
Checked in:
mozilla/modules/libpr0n/decoders/bmp/nsBMPDecoder.h     1.24
mozilla/modules/libpr0n/decoders/bmp/nsICODecoder.cpp   1.41
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Looking good.
Status: RESOLVED → VERIFIED
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: