MQ Gu
MQ Gu

Reputation: 693

How can I get color space from a CGContext?

I want to create a bitmap CGContext with the same color space as an existing CGContext. How can I get the UIColor space of a CGContext?

Upvotes: 2

Views: 2744

Answers (1)

Gordon Childs
Gordon Childs

Reputation: 36169

You need to call CGBitmapContextGetColorSpace to get the colour space of a given bitmap context,
but if you're talking about a general context then the question isn't well defined because CGContexts have two colour spaces: stroke and fill.

Upvotes: 3

Related Questions