Closed Bug 310630 Opened 19 years ago Closed 11 months ago

scaled-down PNG favicon (site icon) is very blurry

Categories

(Camino Graveyard :: General, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: stephen, Unassigned)

References

()

Details

Attachments

(8 files)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20050930 Camino/1.0+ Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20050930 Camino/1.0+ When a site uses a PNG image larger than the standard 16x16 size, Camino scales it down for displaying in location bar, tab title, and bookmarks. The scaled version looks really fuzzy compared to FireFox's display. Reproducible: Always Steps to Reproduce: 1. Go to the example URL and wait for the page to load. 2. Note the favicon displayed in the location bar. Actual Results: The scaled down display of the favicon is fuzzy and aliased. Expected Results: Favicon should be scaled smoothly and anti-aliased. Refer to Firefox's display of the same favicon.
Looks exactly the same as in Safari, so this is an OS issue. We use the OS library to draw favicons, so there's nothing we can do here.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Yes, it looks the same as in Safari. But Firefox renders it much better. See attachment.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
I'm guessing we use system calls to display it while FF uses straight XUL (or something in that realm at least). As such, we're not doing anything "wrong". This is an OS X bug, I would guess. CCing Simon... any thoughts on if we can do this better?
I'm pretty sure this can be fixed by adding the line [[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationHigh]; before we composite the image to our custom cell.
Patch to run just the code Wevah posted in the appropriate place. Rendering is not much better for the example favicon, but perhaps is it too blurry for others?
Attachment #198538 - Flags: review?(sfraser_bugs)
Don't we need this on the tab icon too? I also forget what NSImage does for caching imageReps, and whether this might affect other places where we display the same NSImage.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #6) > Patch to run just the code Wevah posted in the appropriate place. Rendering is > not much better for the example favicon, but perhaps is it too blurry for > others? not -> now (In reply to comment #8) > Don't we need this on the tab icon too? I also forget what NSImage does for > caching imageReps, and whether this might affect other places where we display > the same NSImage. The same view class is used to paint the icon in both the location bar and in the tab view items. Not affected are the drawing in menus and drag icons. It seems there are scaling regressions in the history view for some icons. Could that be a caching issue. So investigation of side effects is needed.
The current tab favicon rendering is *much* worse than the current location bar rendering (extra blurry?), yet (I think) both are the same size. I notice similar, though slightly less noticeable, issues with normal favicons.
(In reply to comment #10) > yet (I think) both are the same size. They aren't; the icon on the tabs is 1 or 2 px smaller in each dimension. It looks much better with the high interpolation, though.
Simon, have you had a chance to look at this?
Target Milestone: --- → Camino1.0
The tabs don't use PageProxyIcon; they use TruncatingImageAndTextCell. I think what the patch is doing is causing a smoothed version of the image to be cached, which then draws smoothed in other places (including the bookmarks bar). Although this gives the intended outcome, I'm not sure it's the most precise way to do it.
Ping. If there's not a better way to do this, would the current patch be better than our current situation? If so, we should checkin this fix and leave the bug open for a better solution for 1.1. Either way, is a fix plausible for 1.0?
Patch is not correct (see my last comment).
Target Milestone: Camino1.0 → Camino1.1
Changed sample URL. Need to place pre-scaled version to my site. Sorry.
*** Bug 323998 has been marked as a duplicate of this bug. ***
Is it not possible to simply increase the size of the favicons in the tab bar by 1 pixel? A lot of favicons include a few characters of text, and they're often unreadable at 15x15. (See BBC screenshot for an example.)
(In reply to comment #18) > Is it not possible to simply increase the size of the favicons in the tab bar > by 1 pixel? A lot of favicons include a few characters of text, and they're > often unreadable at 15x15. (See BBC screenshot for an example.) I think we'd have to increase the height of the tab bar by a pixel to keep the icon looking vertically centered.
I filed bug 326872 on the issue of making tab favicons the same size as location bar favicons (comment 10, comment 11, comment 18, comment 19), so this bug can focus on better scaling down large (>16px) favicons. Also fixing the spelling of "favicon" in the summary so this bug shows up in searches ;)
Summary: PNG favcion scaled down effect is not good → scaled-down PNG favicon is very blurry
Comment on attachment 198538 [details] [diff] [review] Patch using Wevah's snippet r-'ing this based on comment 15; no reason to keep this in the queue.
Attachment #198538 - Flags: review?(sfraser_bugs) → review-
QA Contact: general
Summary: scaled-down PNG favicon is very blurry → scaled-down PNG favicon (site icon) is very blurry
Assignee: mikepinkerton → nobody
Whiteboard: [good first bug]
Target Milestone: Camino1.1 → Camino1.2
Target Milestone: Camino1.6 → ---
The referenced website (ju-ju.com) now has a 16x16 favicon, so is no longer usable for testing. Does anyone have a new example?
I can't remember what the original size of the PNG was when Stephen filed this bug, but this is the 64x64px version returned by his Gravatar on the site.
Sorry guys. I reorganized the size some time ago and forgot to keep the test case file. I updated the location to another version of the test file.
Removing [good first bug] designator since we don't know a) what the correct fix is or b) what exactly the problems with the solutions proposed so far were.
Hardware: PowerPC → All
Whiteboard: [good first bug]
Status: NEW → RESOLVED
Closed: 19 years ago11 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: