Kordophone client for iOS and macOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
296 B

1 year ago
import SwiftUI
extension Image {
init(data: Data) {
#if canImport(AppKit)
self.init(nsImage: NSImage(data: data) ?? .init())
#elseif canImport(UIKit)
self.init(uiImage: UIImage(data: data) ?? .init())
#else
EmptyView()
#endif
}
}