Add image capture support to SKView

Originator:marksands07
Number:rdar://14213285 Date Originated:19-Jun-2013 11:26 PM
Status:Closed/Duplicate Resolved:
Product:iOS SDK Product Version:7.0
Classification:Feature (New) Reproducible:Not Applicable
 
Summary:
SKView is immune to screen captures when using UIGraphicsGetImageFromCurrentImageContext(). The sample code here does not work:

    UIGraphicsBeginImageContext(self.bounds.size);
    [self.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

Steps to Reproduce:
N/A

Expected Results:
SKView should have support for using UIGraphicsGetImageFromCurrentImageContext() to render the layer's contents as an image, or else add a method to render the node as a UIImage.

Alternatively, using -[SKTexture textureFromNode:], add the ability to convert an SKTexture to a UIImage or the ability to save an SKTexture to disk, in order to accomplish the same task through a more verbose path.

Actual Results:
N/A

Regression:
N/A

Notes:
N/A

Comments

+1

By matthewwillhite at Sept. 13, 2013, 1:58 a.m. (reply...)

+1

I'd like to grab a UIImage from an SKTExture as well, especially for cases when I create an SKTexture from a node tree.

By mustafashabib at June 20, 2013, 7:23 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!