WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
7120
API Request: creating DOMHTMLImageElements from NSImages
https://bugs.webkit.org/show_bug.cgi?id=7120
Summary
API Request: creating DOMHTMLImageElements from NSImages
David Smith
Reported
2006-02-06 21:48:12 PST
Currently there is no way of displaying an NSImage from a Cocoa program in a WebView (such as buddy icons in Adium's webkit message view) except writing it out to a file, creating a DOMHTMLImageElement, and setting the src attribute to the path of the image file. It would be both more convenient and more efficient to have a way of directly using the NSImage to create the DOMHTMLImageElement.
Attachments
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2006-02-06 22:59:04 PST
Well, it's also possible to uuencode the image data, and set the src as a data url. But I agree, that's pretty inelegant.
Peter Hosey
Comment 2
2006-03-22 00:17:48 PST
(In reply to
comment #1
)
> Well, it's also possible to uuencode the image data, and set the src as a data url.
Not really that practical in Adium's WKMV. A buddy icon may appear hundreds of times in a single chat (most message-view styles have the buddy icon once per contiguous run of messages; such runs are usually small, 1-2 messages typically). Depending on the icon, that's a lot of data to add into memory each time. A way to do a proper image reference would conserve huge amounts of memory versus that solution, because it could take advantage of caching.
Stanislas Polu
Comment 3
2013-01-14 23:41:22 PST
Just FYI this would be a very nice feature to add to the API.
Alexey Proskuryakov
Comment 4
2013-01-15 09:57:22 PST
> it's also possible to uuencode the image data, and set the src as a data url
Alternatively, the client could serve image data using a custom protocol.
Stanislas Polu
Comment 5
2013-01-15 10:48:21 PST
(In reply to
comment #4
)
> Alternatively, the client could serve image data using a custom protocol.
Can you elaborate on that?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug