Closed Yookiely closed 6 months ago
BTW LottieAnimationLayer is also not work.
Here is some discussion: https://github.com/airbnb/lottie-ios/discussions/1769#discussioncomment-3860672. This is a known limitation of the Core Animation rendering engine.
lottie-ios 4.3.0 I would like to use the following code to obtain a screenshot of Lottie View
UIGraphicsBeginImageContextWithOptions(animationView.bounds.size, false, 0) if let context = UIGraphicsGetCurrentContext() { animationView.layer.render(in: context) let image = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() }
But it will exhibit different results due to different lottie types. If I use lottie with Base64 Image, I can't get the correct Image. Example.issue_1800.json in Project Example
I want to have
but real...
And if I use the lottie source file which doesn't have base64 Img, It will be correct.
So why? Could the lottie source file with base64 Img use other way to get the correct snapshot?