Bug 11291 - PNG as cursor image format instead of TIFF
Summary: PNG as cursor image format instead of TIFF
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Enhancement
Assignee: Nobody
URL: http://www.biotopia.dk/css-cursors/
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-14 08:04 PDT by Lars Næsbye Christensen
Modified: 2006-10-23 18:12 PDT (History)
1 user (show)

See Also:


Attachments
Patch to switch format for cursors to PNG (34.16 KB, patch)
2006-10-14 08:07 PDT, Lars Næsbye Christensen
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Næsbye Christensen 2006-10-14 08:04:06 PDT
PNG is a more versatile format, smaller and with better compression, than the TIFF format we use in WebKit cursors.
The patch below adds the current local cursors in PNG format and makes WebKit use them instead. It does not delete the TIFFs, though.

The patch is part of some plans of bigger revamp of the WebKit cursors, which is described on the webpage above.
Comment 1 Lars Næsbye Christensen 2006-10-14 08:07:16 PDT
Created attachment 11087 [details]
Patch to switch format for cursors to PNG

Since the files added are just conversions of current included images (one is made thicker by me, though), they should be covered by the BSD. If I have any rights to that file, I am happy to transfer it to the WebKit project under the BSD license.
Comment 2 Alexey Proskuryakov 2006-10-15 02:20:51 PDT
Re: ImageIO support for .cur - at the moment, it's quite broken (can be seen with a WebKit nightly on maps.google.com). I do not know whether Apple is going to fix this, or WebKit will have to provide its own .cur decoding.

rdar://4556355
rdar://4639253
Comment 3 Timothy Hatcher 2006-10-18 23:09:14 PDT
I don't see the benefit of ths.
Comment 4 Timothy Hatcher 2006-10-19 22:00:36 PDT
Comment on attachment 11087 [details]
Patch to switch format for cursors to PNG

Actually this will help other platforms, since TIFF  is only supported on the Mac now.
Comment 5 Lars Næsbye Christensen 2006-10-20 00:13:08 PDT
(In reply to comment #3)
> I don't see the benefit of ths.

Primarily I thought of it as the first step in a series of cursor rewriting updating as I explained on the link. The PNG format is smaller, decompresses faster and is more suited to this task. Maybe this is why Apple stores cursordata in PNG format internally.....?
We talked a bit about in on #webkit, and sadly we don't have support for a raster image format that supports full alpha, true color AND animation. Which is why I filed a request to Apple for MNG support.

However, the other suggestions I have are not dependent on this, e.g. I could make them in TIFF anyway.

alexey: as for the support of .cur files, yes that Google Maps cursor looks terrible :-( Until ImageIO handles them properly, we should perhaps come up with a better local solution.
Comment 6 Lars Næsbye Christensen 2006-10-23 15:49:12 PDT
Nice that it got accepted. I'll work on the next series of cursor patches soon :-)
Comment 7 Sam Weinig 2006-10-23 18:12:21 PDT
Landed in r17227.