Closed Bug 339717 Opened 18 years ago Closed 18 years ago

add 8-bit alpha support to Carbon icon decoder

Categories

(Core :: Graphics: ImageLib, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jaas, Assigned: jaas)

Details

(Keywords: fixed1.8.1)

Attachments

(2 files)

We need to add 8-bit alpha support to the Carbon icon decoder since we can't use the Cocoa decoder in Carbon builds (Firefox 2).
Attached patch fix v1.0Splinter Review
This is a really conservative way to fix this. I have some other less conservative fixes in the works from messing around with this, but I'm not sure we really need to do more. Just posting this here for comments now.
Oh, to explain the conservative fix. We do everything exactly the same, but if the icon data we get is non-indexed 32-bit data (which it almost always is) then we copy make the alpha 8-bit and copy the alpha data from the 32-bit icon data. If that is not the case then absolutely nothing has changed.
Attached patch fix v1.1Splinter Review
This is also conservative also, but it gets the 8-bit mask resource instead of grabbing the 8-bit mask from 32-bit icon data.
Attachment #223840 - Flags: review?(mark)
Comment on attachment 223840 [details] [diff] [review] fix v1.1 We can go with this now. Keep in mind the stuff I suggested about icns files that don't include the exact icon size we ask for. The Cocoa decoder did scaling automatically, this decoder won't handle that.
Attachment #223840 - Flags: review?(mark) → review+
Right, but that is a separate bug not related to the fact that we don't support 8 bit alpha. I'll file it later today.
Attachment #223840 - Flags: superreview?(pavlov)
Attachment #223840 - Flags: superreview?(pavlov) → superreview+
checked in on trunk and 1.8.1 branch
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Keywords: fixed1.8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: