mac os x access framebuffer raw data
Asked Answered
T

1

6

I have to perform some task which need to access the screen data in the framebuffer of OS X. In 10.6.8 we can get the framebuffer base address by using Quart Display Service API, but we can not do this in 10.7 or 10.8.

Apple suggest to get the screen image by using CGDisplayCreateImage. But it is inefficient to get the raw image data because we have to draw the obtained image object to a context.

Is there other ways to get the raw data of a framebuffer?

Tolmann answered 3/9, 2012 at 7:52 Comment(0)
F
1

You don't need to draw the image returned by CGDisplayCreateImage to retrieve the raw image data. You can use CGImageGetDataProvider followed by CGDataProviderCopyData to get the data from it.

Felecia answered 20/9, 2013 at 10:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.