Page 1 of 2

Gray box instead of image [RESOLVED]

Posted: Mon Feb 21, 2022 2:02 pm
by paplos
Hi all,
I am experiencing the following weird behaviour when trying to draw an image: Instead of drawing the image, a gray box (see attached picture) appears in its place. This only occurs with one specific png file on one specific platform (The error occurs on raspberrry pi but not on mac).

Has anybody seen something like that or has an idea about what the issue could be?

Thanks!

Re: Gray box instead of image

Posted: Mon Feb 21, 2022 3:15 pm
by dusoft
No attachment seems to be available. Maybe Raspbian does not have PNG support?

Re: Gray box instead of image

Posted: Mon Feb 21, 2022 4:42 pm
by BrotSagtMist
Upload the pnd and say which pi model you have.

The odd claim here is that the picture turns grey. Usually similar problems return white, black or pictures with switched color channels.

Re: Gray box instead of image

Posted: Tue Feb 22, 2022 9:02 pm
by paplos
Thanks for trying to help me!
Here is the "Screenshot" of the gray box that appears instead of my image. It works with other png files in the same game. I also tried using jpg with no success.
I am using a pi 3 with retropie.
PHOTO-2022-02-22-22-01-20.jpg
PHOTO-2022-02-22-22-01-20.jpg (254.5 KiB) Viewed 3652 times

Re: Gray box instead of image

Posted: Tue Feb 22, 2022 9:25 pm
by BrotSagtMist
I meant to say: Upload the specific png in question.

Re: Gray box instead of image

Posted: Tue Feb 22, 2022 11:08 pm
by DaedalusYoung
Are the image dimensions powers of 2? This used to be an issue in older versions, because graphics cards don't like it if images are not powers of two. It has been fixed, but I can imagine there's some edge cases where it's still an issue.

[edit]
The fix was made in version 0.8.0, see information [here].

Re: Gray box instead of image

Posted: Wed Feb 23, 2022 6:28 pm
by paplos
This is the png file I am trying to draw:
rock2.png
rock2.png (286.38 KiB) Viewed 3597 times
The Dimensions of the png are 2080 × 660. I am using Löve 11.1.

Re: Gray box instead of image

Posted: Wed Feb 23, 2022 6:37 pm
by GVovkiv
Under love 11.4, linux, it draws as expected
Are you tried other images with same or bigger dimensions?

Re: Gray box instead of image

Posted: Wed Feb 23, 2022 7:29 pm
by BrotSagtMist
Check https://love2d.org/wiki/love.graphics.getSystemLimits
That picture may be slightly over the size what the pi can handle.
But it should raise an error rather than drawing a grey box.

Re: Gray box instead of image

Posted: Wed Feb 23, 2022 7:51 pm
by GVovkiv
Attempting to create an Image with a width or height greater than the maximum supported will create a checkerboard-patterned image instead. Doing the same for a Canvas will result in an error.
https://love2d.org/wiki/GraphicsLimit
huh?