CGcontext setfillcolor результат в инвертированном цвете - PullRequest
0 голосов
/ 04 июня 2019

CGContext: setfillcolor с красным результатом в синем заполнении цвета

Воспроизведение цветового пространства при создании контекста, что бесполезно.

let gc:CGContext = CGContext.init(data: CVPixelBufferGetBaseAddress(destination), width: width, height: height, bitsPerComponent: 8, bytesPerRow: CVPixelBufferGetBytesPerRow(destination), space: backImage.colorSpace!, bitmapInfo: backImage.bitmapInfo.rawValue)!;

   //TODO: Color getting inverted
gc.setFillColor(UIColor.red.cgColor);
gc.fill(frame);

...