Re: Caching the Image from Webview
Re: Caching the Image from Webview
- Subject: Re: Caching the Image from Webview
- From: Chris Ryland <email@hidden>
- Date: Fri, 9 Mar 2007 01:22:49 -0500
See <http://inessential.com/downloads/HybridApps.vpdoc.zip> for a
VoodooPad doc from Brent Simmons that addresses the problem of making
screenshots of webviews.
The core text from there:
- - -
How to create web-page thumbnail:
1. Create offscreen window with WebView and load page
2. Create image from WebView
[_webview lockFocus];
NSBitmapImageRep *bitmap = [[[NSBitmapImageRep alloc]
initWithFocusedViewRect:[self webviewRect]] autorelease];
[_webview unlockFocus];
NSImage *image = [[[NSImage alloc] initWithData:[bitmap
TIFFRepresentation]] autorelease];
- - -
Hope this helps.
On Mar 6, 2007, at 11:56 PM, David Chan wrote:
Hi everyone,
Let's say that I have a flash movie playing on my webview, and I need
to allow user to cache a particular scene and store it into bitmap
image rep format, in order to be converted to NSImage and displayed.
Is this possible to do? and if so, how can we do it?
Or.. if I am just showing a webpage on the webview and I want to cache
the image into bitmap image rep. Is this possible?
Thank you in advance for your attention.
Regards,
David Chandra
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Cheers!
--Chris Ryland / Em Software, Inc. / www.emsoftware.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden