Hi,

Has anyone tried and succeeded in capturing the contents of an SKView to an 
NSImage ? Techniques working for a regular NSView won't work apparently because 
an SKView is based on OpenGL. I tried taking advantage of the fact that an 
SKScene is an SKEffectNode and used a custom CIFilter which would dump the 
content of its input image on demand, but when doing this :

        NSBitmapImageRep* imageRep = [[NSBitmapImageRep alloc] 
initWithCIImage:self.inputImage];

        NSData* imageData = [imageRep representationUsingType:NSPNGFileType 
properties:nil];

the call to NSBitmapImageRep:representationUsingType fails with

clCreateFromGLTexture() failed with error code = CL_INVALID_GL_OBJECT

any ideas ?

Thanks

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to