mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
Fix flipped static emoji
This commit is contained in:
parent
e70df961e1
commit
794d415e7d
@ -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) {
|
if let data = try? Data(contentsOf: URL(fileURLWithPath: path)), let image = WebP.convert(fromWebP: data) {
|
||||||
writer.add(with: { surface in
|
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)
|
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)
|
UIGraphicsPushContext(c)
|
||||||
c.draw(image.cgImage!, in: CGRect(origin: CGPoint(), size: context.size))
|
c.draw(image.cgImage!, in: CGRect(origin: CGPoint(), size: context.size))
|
||||||
UIGraphicsPopContext()
|
UIGraphicsPopContext()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user