zhengrush

Results 4 comments of zhengrush

也可以通过继承`Resource`,然后重写`open override func image(at time: CMTime, renderSize: CGSize) -> CIImage? `来获取每一帧的画面, Lottie里面有提供方法来获取每一帧的画面

谢谢大佬回复,我是放在`passingThroughVideoCompositionProvider `来处理浮层,比如文字,静态图片,动态贴纸,其实你说AVSynchronizedLayer的那种实现方案应该更符合项目的需求,因为在预览的过程中可能会调整layer层的展示效果,比如调整大小,旋转角度之类的

> > 也可以通过继承`Resource`,然后重写`open override func image(at time: CMTime, renderSize: CGSize) -> CIImage? `来获取每一帧的画面, Lottie里面有提供方法来获取每一帧的画面 > > Lottie有获取方法么 要改写下Lottie的代码,通过time计算出动画的progress,然后渲染layer,最后把layer变成CIImage,具体参考[https://github.com/lvpengwei/LottieInVideo](https://github.com/lvpengwei/LottieInVideo)

通过继承`Resource`,然后重写`open override func image(at time: CMTime, renderSize: CGSize) -> CIImage?` 来获取每一帧的画面