Image from data or UIImage #125
Answered
by
marcprux
Louis-PAGNIER
asked this question in
Q&A
-
Hello ! |
Beta Was this translation helpful? Give feedback.
Answered by
marcprux
May 22, 2024
Replies: 1 comment 4 replies
-
If your image is stored in an assert catalog or in a URL in your app's Bundle, you can load it through one of the methods described at https://skip.tools/docs/modules/skip-ui/#images We don't currently implement |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's unfortunately no
SwiftUI.Image(data:)
constructor, so if you are wanting to load an image from a Data or byte array, your best bet right now would be to store it to a local URL and then load it withAsyncImage(url:)
. Something like:If you don't want to write to the file system, you could also construct a "data:" URL with the base64-encoded bytes, which should also work with
AsyncImage
.Let us know if either of these work for you.