0 votes

Hey Guys!
I am trying to find a way of loading a extern image into Godot.
I found multiple discussions about more or less the same topic, but the examples I find are only for audio files and after a few hours of googeling, experimenting and reading the docs up an down, I just can't get them to work with image files.

I know that there is no easy built-in function or anything like that in Godot right know, but for example in this thread someone is saying, importing a .png file is "simple enough":
https://github.com/godotengine/godot-proposals/issues/1632#issuecomment-709985535

I hope somebody can help me, thank you in advance!

Godot version 3.2.3
in Engine by (17 points)

1 Answer

0 votes
func _ready():
    var image = Image.new()
    image.load("image path")
    var t = ImageTexture.new()
    t.create_from_image(image)
    $Sprite.texture = t
by (266 points)

Thank you but thats not what I meant.
Your code only works if Godot imported the Image already,.
I am searching for a solution that can import a Image, from a external source.

like a website or from another directory on the file manager like C://user:/Desktop/image.png

From another directory on the Drive, loading already imported Images works Just fine.

Exactly! Would you be so kind and a share your Code?

funny enough its exactly the same as the answer but only difference is using the filedialog node as a path project file here

Your implementation still didn't wotk for me :( But still thank you a lot, for taking your time!
If anyone stumbles uppon this poblem, over on Reddit, someone suggested a solution that worked for me: https://www.reddit.com/r/godot/comments/ox381i/how_can_i_load_a_image_from_my_filesystem_into_my/

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.