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!
Gray box instead of image [RESOLVED]
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Gray box instead of image [RESOLVED]
Last edited by paplos on Thu Feb 24, 2022 11:15 am, edited 2 times in total.
Re: Gray box instead of image
No attachment seems to be available. Maybe Raspbian does not have PNG support?
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
- BrotSagtMist
- Party member
- Posts: 655
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Gray box instead of image
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.
The odd claim here is that the picture turns grey. Usually similar problems return white, black or pictures with switched color channels.
obey
Re: Gray box instead of image
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.
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.
- BrotSagtMist
- Party member
- Posts: 655
- Joined: Fri Aug 06, 2021 10:30 pm
- DaedalusYoung
- Party member
- Posts: 413
- Joined: Sun Jul 14, 2013 8:04 pm
Re: Gray box instead of image
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].
[edit]
The fix was made in version 0.8.0, see information [here].
Re: Gray box instead of image
This is the png file I am trying to draw:
The Dimensions of the png are 2080 × 660. I am using Löve 11.1.Re: Gray box instead of image
Under love 11.4, linux, it draws as expected
Are you tried other images with same or bigger dimensions?
Are you tried other images with same or bigger dimensions?
- BrotSagtMist
- Party member
- Posts: 655
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Gray box instead of image
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.
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
Re: Gray box instead of image
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?
https://love2d.org/wiki/GraphicsLimit
huh?
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot], Semrush [Bot] and 3 guests