My bad, Here ya go. The source code I ended up using:

// This gets the screen resolution.
// You can set your own rect if you want to capture a portion of the screen
CGRect screenRect = [[UIScreen mainScreen] bounds];

// This stuff is fairly standard, look up the functions/classes if you want
to know more
UIGraphicsBeginImageContextWithOptions(screenRect.size, NO, 0.0);
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextFillRect(ctx, screenRect);

// myWebView should be replaced with which ever WebView you you want to
capture.
// For instance I'm using PhoneGap so at any point after the WebView was
created (After *webViewDidStartLoad* is called)
[myWebView.layer renderInContext:ctx];

// Creates the final image to output
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();

// Copy to Photos Album (Optional to make sure it worked.)
UIImageWriteToSavedPhotosAlbum(newImage, nil, nil, nil);

// Cleanup
UIGraphicsEndImageContext();

Francois

On Mon, Jan 17, 2011 at 1:38 AM, Remi Grumeau  <[email protected]>wrote:

> And would you please share what you found?
>
> R.
>
> On 17 janv. 2011, at 07:29, Francois Laberge <[email protected]>
> wrote:
>
> > I figured it out. Works great
> >
> > Sent from my iPhone
> >
> > On 2011-01-17, at 12:30 AM, RobG <[email protected]> wrote:
> >
> >>
> >>
> >> On Jan 14, 7:24 am, Francois Laberge <[email protected]>
> >> wrote:
> >>> Is there a way to read back the entire screen buffer of an iPhone. At
> any
> >>> point in time?
> >>
> >> Probably, but I expect you'll need a native application. I can't think
> >> of a practical way to do it with a web application (i.e. javascript +
> >> css + html).
> >>
> >>
> >> --
> >> Rob
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups "iPhoneWebDev" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to
> [email protected]<iphonewebdev%[email protected]>
> .
> >> For more options, visit this group at
> http://groups.google.com/group/iphonewebdev?hl=en.
> >>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "iPhoneWebDev" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> [email protected]<iphonewebdev%[email protected]>
> .
> > For more options, visit this group at
> http://groups.google.com/group/iphonewebdev?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "iPhoneWebDev" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<iphonewebdev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/iphonewebdev?hl=en.
>
>


-- 
*Phone: *
919 259 3004
*Website:*
http://endergen.com
*Social Media:*
 
<http://twitter.com/francoislaberge><http://linkedin.com/in/francoislaberge><http://facebook.com/endergen>
*Address:*
201 Conner Drive - Apt. 4
Chapel Hill, NC
27514

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to