Gray box instead of image [RESOLVED]

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
paplos
Prole
Posts: 4
Joined: Mon Feb 21, 2022 1:56 pm

Gray box instead of image [RESOLVED]

Post 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!
Last edited by paplos on Thu Feb 24, 2022 11:15 am, edited 2 times in total.
User avatar
dusoft
Party member
Posts: 510
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Gray box instead of image

Post by dusoft »

No attachment seems to be available. Maybe Raspbian does not have PNG support?
User avatar
BrotSagtMist
Party member
Posts: 614
Joined: Fri Aug 06, 2021 10:30 pm

Re: Gray box instead of image

Post 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.
obey
paplos
Prole
Posts: 4
Joined: Mon Feb 21, 2022 1:56 pm

Re: Gray box instead of image

Post 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 3258 times
User avatar
BrotSagtMist
Party member
Posts: 614
Joined: Fri Aug 06, 2021 10:30 pm

Re: Gray box instead of image

Post by BrotSagtMist »

I meant to say: Upload the specific png in question.
obey
User avatar
DaedalusYoung
Party member
Posts: 407
Joined: Sun Jul 14, 2013 8:04 pm

Re: Gray box instead of image

Post 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].
paplos
Prole
Posts: 4
Joined: Mon Feb 21, 2022 1:56 pm

Re: Gray box instead of image

Post by paplos »

This is the png file I am trying to draw:
rock2.png
rock2.png (286.38 KiB) Viewed 3203 times
The Dimensions of the png are 2080 × 660. I am using Löve 11.1.
User avatar
GVovkiv
Party member
Posts: 670
Joined: Fri Jan 15, 2021 7:29 am

Re: Gray box instead of image

Post by GVovkiv »

Under love 11.4, linux, it draws as expected
Are you tried other images with same or bigger dimensions?
User avatar
BrotSagtMist
Party member
Posts: 614
Joined: Fri Aug 06, 2021 10:30 pm

Re: Gray box instead of image

Post 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.
obey
User avatar
GVovkiv
Party member
Posts: 670
Joined: Fri Jan 15, 2021 7:29 am

Re: Gray box instead of image

Post 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?
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 58 guests