This site requires JavaScript, please enable it in your browser!
Greenfoot back
dandrei279
dandrei279 wrote ...

2016/12/27

Can't import background image

dandrei279 dandrei279

2016/12/27

#
Hello everyone! I faced "java.lang.OutOfMemoryError: Java heap space" error when I try to add a background from my files. I can use predefined backgrounds but I can't use my own image. I have tried both png and jpeg files.
davmac davmac

2016/12/27

#
Perhaps the image is too large. What are the dimensions?
dandrei279 dandrei279

2016/12/28

#
davmac wrote...
Perhaps the image is too large. What are the dimensions?
It's 6670*3752 and 1.76 MB
davmac davmac

2016/12/28

#
dandrei279 wrote...
It's 6670*3752 and 1.76 MB
The 6670*3752 is the relevant part. That's huge. When loaded that image will require more than 90 megabytes of storage. Given that the screen size is surely less than that, maybe you can scale the image down?
dandrei279 dandrei279

2016/12/28

#
Thanks man! That worked!
You need to login to post a reply.