I want to load a remote image that will be centered on the screen. Using HTTPRequest
I successfully loaded the image.. but it's toooo slow@!!@#
My project settings are using Stretch mode: 2D which means the image needs to be a big size because of scaling. If I try to load a 1472x849 image.. it takes about 5 secs to display the image.
Is there a way to load an image faster or maybe make it ignore the scaling of the window. In this way I can load an image with smaller size
func _on_request_completed(result: int, response_code: int, headers: PoolStringArray, body: PoolByteArray) -> void:
var image = Image.new()
var image_error = image.load_png_from_buffer(body) if fileExtension == "png" else image.load_jpg_from_buffer(body)
if image_error != OK:
print("An error occurred while trying to display the image.")
var texture = ImageTexture.new()
texture.create_from_image(image)