mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Optimize image drawing
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user