Convert an image to a 16bit color image

后端 未结 1 1886
清酒与你
清酒与你 2020-12-22 02:31

I\'m looking for a way to optimize my images by converting its color from 32bit to 16bit rather than just solely resize it. So this is what I\'m doing:

- (UI         


        
相关标签:
1条回答
  • 2020-12-22 02:48

    So I've found my answer in Mac Developer Library. There's a table for the supported pixel formats and this is what I'm looking for:

    RGB - 16 bpp, 5 bpc, kCGImageAlphaNoneSkipFirst

    So I've changed my bitmapInfo and the context's created just fine. Hopefully this is useful for someone.

    0 讨论(0)
提交回复
热议问题