mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Optimize image drawing
This commit is contained in:
parent
d0830b3c00
commit
0f9648fb6c
17 changed files with 137 additions and 148 deletions
|
|
@ -46,7 +46,7 @@ public func qrCode(string: String, color: UIColor, backgroundColor: UIColor? = n
|
|||
|
||||
if let output = filter.outputImage {
|
||||
let size = Int(output.extent.width)
|
||||
let bytesPerRow = (4 * Int(size) + 15) & (~15)
|
||||
let bytesPerRow = DeviceGraphicsContextSettings.shared.bytesPerRow(forWidth: Int(size))
|
||||
let length = bytesPerRow * size
|
||||
let bitmapInfo = CGBitmapInfo(rawValue: CGBitmapInfo.byteOrder32Little.rawValue | CGImageAlphaInfo.noneSkipFirst.rawValue)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue