mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Fix raster template emoji
This commit is contained in:
parent
73ce7faf66
commit
37e861817b
1 changed files with 4 additions and 3 deletions
|
|
@ -70,11 +70,12 @@ public func cacheStillSticker(path: String, width: Int, height: Int, writer: Ani
|
|||
UIGraphicsPushContext(c)
|
||||
|
||||
if let customColor = customColor {
|
||||
c.clip(to: CGRect(origin: CGPoint(), size: context.size), mask: image.cgImage!)
|
||||
c.setFillColor(customColor.cgColor)
|
||||
c.setBlendMode(.sourceIn)
|
||||
c.fill(CGRect(origin: CGPoint(), size: context.size))
|
||||
} else {
|
||||
c.draw(image.cgImage!, in: CGRect(origin: CGPoint(), size: context.size))
|
||||
}
|
||||
|
||||
c.draw(image.cgImage!, in: CGRect(origin: CGPoint(), size: context.size))
|
||||
UIGraphicsPopContext()
|
||||
}
|
||||
memcpy(surface.argb, context.bytes, surface.height * surface.bytesPerRow)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue