VideoFlint / Cabbage

A video composition framework build on top of AVFoundation. It's simple to use and easy to extend.
MIT License
1.52k stars 221 forks source link

生成的视频颜色有偏差 sRGB / RGB #44

Open huanglins opened 4 years ago

huanglins commented 4 years ago

VideoCompositor 中最后渲染的代码修改就可以解决

VideoCompositor.ciContext.render(image, to: outputPixels)

改为:

let colorSpace = CGColorSpace.init(name: CGColorSpace.sRGB) ?? CGColorSpaceCreateDeviceRGB()
        VideoCompositor.ciContext.render(image, to: outputPixels, bounds: image.extent, colorSpace: colorSpace)