Hi Mike,
On Fri, Dec 8, 2017 at 9:21 PM, Michael Crawford <
mi...@soggywizards.com> wrote:
> The IOFramebuffer driver - a component of the IOGraphicsFamily -
> supports 8, 16 and 32 bit.
>
> However there is no UI for setting the bit depth in the Display Prefs.
> That leads me to believe that only 32 bit is ever used.
>
> Is that the case?
If given it that choice, I have indeed never seen WindowServer pick
anything other than 32-bit mode since Mac OS X 10.6 or so. There's
little point in offering other depths, it just adds unnecessary
complexity to your code. Some iMacs use a higher bit depth than that;
the headers also declare some YUV pixel formats. I've not experimented
with unaccelerated IOFramebuffers that support any of these, but I
suspect you'll be safest if you do any conversions you might need
after grabbing the 32-bit RGB image.
Hope that helps,
Phil