SFML community forums
Help => Graphics => Topic started by: AcaMilanovic on January 18, 2011, 08:15:00 pm
-
Hi,
I am using SFML on Linux. When I try to load an image it fails with error "Failed to create image, its internal size is too high (128x128)". I tried to load a smaller image, but it also returns the same error. Do you have an idea how to make it work ? It's a PNG image.
P.S. The image is in the right folder, and I even tried to use absolute path, and it didn't help.
-
Can you show your code? Are your graphics drivers up to date? Can you run glxgears?
-
I can run glxgears. Graphics drivers are up to date. I'm using Ubuntu 11.04 x64 and ATI/AMD proprietary FGLRX drivers.
/* Loading image. */
sf::Image imgGame;
imgGame.LoadFromFile("buttonGame.png");
/* Setting image. */
buttonGame.SetImage(imgGame);
buttonGame.SetPosition(225,200);
-
I mean a complete code that I can test :)
-
Thank you Laurent, I just figured myself out what was wrong. I've been loading the image in a class destructor. :roll: