Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image.load_ from_file() and texture.get_image() returned null when the image to be loaded is too large. #79231

Closed
hylea opened this issue Jul 9, 2023 · 3 comments

Comments

@hylea
Copy link

hylea commented Jul 9, 2023

Godot version

v4.1.stable.official [9704596]

System information

Windows 10 - v4.1.stable

Issue description

Image.load_ from_file() and texture.get_image() returned null when the image to be loaded is too large (e.g. 512x512, 1280256, 2048 * 1028, etc.) . However, loading smaller images returns as expected (e.g. 1280 * 128, 2048127, etc.).
image
image

Steps to reproduce

var img_a = Image.load_from_file("res://Images/img_1280x1024.png")  # null 
var img_b = Image.load_from_file("res://Images/img_1280x256.png")   # null 
var img_c = Image.load_from_file("res://Images/img_1280x128.png")   #OK 

var texture_a:Texture2D        = load("res://Images/img_1280x1024.png")    #OK
var img_of_texture_a: Image = texture_a.get_image()                 # null 
var texture_b:Texture2D        = load("res://Images/img_1280x256.png")     #OK
var img_of_texture_b: Image = texture_b.get_image()                 # null
var texture_c:Texture2D         = load("res://Images/img_1280x128.png")     #OK
var img_of_texture_c: Image  = texture_c.get_image()                 #OK

Minimal reproduction project

Project_image_load.zip

@RedworkDE
Copy link
Member

See also #36801

Try to add print(img_a) etc to check if this is just a debugger issue or if the image is actually null.

@hylea
Copy link
Author

hylea commented Jul 9, 2023

See also #36801

Try to add print(img_a) etc to check if this is just a debugger issue or if the image is actually null.

Yes. The output of 'print (img_a)' is not null.
Now, what should I do to deal with the debugger issue ?

@AThousandShips
Copy link
Member

AThousandShips commented Jul 9, 2023

Then this is a duplicate of #36801

Thank you for reporting, see that issue for more information

@AThousandShips AThousandShips closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants