[TIMOB-28490] iOS 15 - Ti.ImageFactory: Use new image decoding API's
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | None |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | n/a |
| Reporter | Hans Knöchel |
| Assignee | Joshua Quick |
| Created | 2021-06-12T13:03:49.000+0000 |
| Updated | 2021-09-15T01:25:47.000+0000 |
Description
See this thread: https://www.swiftjectivec.com/ios-15-notable-uikit-additions/
Example (instead of the manual cropping):
let thumbnailImg = UIImage(named: "Baylor")!
thumbnailImg.preparingThumbnail(of: CGSize(width: 200, height: 400))
// Or, do it async on a background thread
thumbnailImg.preparingThumbnail(of: CGSize(width: 200, height: 400)) {
// Now dispatch back to main to use it
}
No comments