0 Members and 2 Guests are viewing this topic.
What's the exact error message you get?What's the overall memory usage of your application? What's your OS? What version of SFML are you running?
What the size (width and height) of your image?
The problem is most likely your vRAM in GPU being too small to load image to its memory. Hover it can be contained within your normal RAM, so sf::Image methods work properly, as they use image stored as array of pixels.
As far as I know textures in vram are not compressed, so they may take quite more place. And YOU do load it to vram somewhere by using sf::Texture, sf::Image itself stores everything in RAM, and if it crashes, there may be some problem with SFML. If you want to draw it, you should divide it into smaller pieces, place in sf::Image/s and dynamically create sf::Textures to upload those to VRAM. However it can be pretty slow. Maybe lower image's resolution?