Hello, I am trying to make an image loading library that loads images from urls and other stuff, is there a way to load an image on
JS
from local files?
Dragos Rachieru
05/16/2022, 8:24 AM
or can you show me an example how to use
Image
?
h
hfhbd
05/16/2022, 10:22 AM
Your web browser does not have access to your local file system, for good reasons. If you want to include images, just use the regular HTML img tag/function.
d
Dragos Rachieru
05/16/2022, 11:33 AM
I changed my implementation to use
ktor
and read the bytes and then use
Image.makeFromEncoded
, for desktop it works,
JS
doesn't work for me yet, I'll have to check why it shows me an error