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
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!
+1
+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.