mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-03-11 05:19:13 +00:00
some bad code
This commit is contained in:
@@ -111,6 +111,18 @@ struct Emoji: Codable, Identifiable, Hashable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let rect = CGRect(origin: .zero, size: newSize)
|
let rect = CGRect(origin: .zero, size: newSize)
|
||||||
|
|
||||||
|
if let frames = image.images {
|
||||||
|
var result: [UIImage] = []
|
||||||
|
for frame in frames {
|
||||||
|
UIGraphicsBeginImageContextWithOptions(newSize, false, 1.0)
|
||||||
|
frame.draw(in: rect)
|
||||||
|
result.append(UIGraphicsGetImageFromCurrentImageContext() ?? UIImage())
|
||||||
|
UIGraphicsEndImageContext()
|
||||||
|
}
|
||||||
|
return UIImage.animatedImage(with: result, duration: image.duration) ?? UIImage()
|
||||||
|
}
|
||||||
|
|
||||||
UIGraphicsBeginImageContextWithOptions(newSize, false, 1.0)
|
UIGraphicsBeginImageContextWithOptions(newSize, false, 1.0)
|
||||||
image.draw(in: rect)
|
image.draw(in: rect)
|
||||||
return UIGraphicsGetImageFromCurrentImageContext() ?? UIImage()
|
return UIGraphicsGetImageFromCurrentImageContext() ?? UIImage()
|
||||||
|
|||||||
Reference in New Issue
Block a user