From 794d415e7df01f47e54015d18fe3c1d99c4218b8 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Wed, 13 Jul 2022 12:11:08 +0200 Subject: [PATCH] Fix flipped static emoji --- .../LottieAnimationCache/Sources/LottieAnimationCache.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/TelegramUI/Components/LottieAnimationCache/Sources/LottieAnimationCache.swift b/submodules/TelegramUI/Components/LottieAnimationCache/Sources/LottieAnimationCache.swift index 85ef713466..9cac2ad1a3 100644 --- a/submodules/TelegramUI/Components/LottieAnimationCache/Sources/LottieAnimationCache.swift +++ b/submodules/TelegramUI/Components/LottieAnimationCache/Sources/LottieAnimationCache.swift @@ -33,7 +33,7 @@ public func cacheStillSticker(path: String, width: Int, height: Int, writer: Ani if let data = try? Data(contentsOf: URL(fileURLWithPath: path)), let image = WebP.convert(fromWebP: data) { writer.add(with: { surface in let context = DrawingContext(size: CGSize(width: CGFloat(surface.width), height: CGFloat(surface.height)), scale: 1.0, opaque: false, clear: true, bytesPerRow: surface.bytesPerRow) - context.withContext { c in + context.withFlippedContext { c in UIGraphicsPushContext(c) c.draw(image.cgImage!, in: CGRect(origin: CGPoint(), size: context.size)) UIGraphicsPopContext()