Questions tagged [sdl-image]

SDL_image is an image file loading library. It loads images as SDL surfaces, and supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, XV.

156 questions
-1
votes
4 answers

How to repair this error of executing?

Every time I compile my simple SDL1.2 code it's compiled successfully but when I try to run it via terminal (alt+t in Ubuntu): ./game Segmentation fault (core dumped) I get this error. Can you help please? This is the code: #include int…
Amir Bennasr
  • 216
  • 1
  • 2
  • 10
-1
votes
1 answer

C++ SDL, SDL_image issues

IDE: Code::blocks Compiler: MinGW I have SDL and SDL_image installed correctly (it doesn't give any errors when built). Everything compiles fine but when I run it, the SDL window comes up, but the image never blits, the window. I use SDL_image so I…
-2
votes
1 answer

SDL2 Transparency is super glitchy

(Source code and problem line at the bottom) I made a simple program to load a transparent PNG onto SDL2. However, it pops up as the image, with a very glitchy background that keeps flashing. I suspect this is a problem with my graphics card (M2…
Eric Xue
  • 272
  • 2
  • 11
-2
votes
2 answers

SDL_image.h fatal error: No such file or directory

I am using Debian and i downloaded SDL_image.h succesfully. (sudo apt-get install libsdl2-image-dev) I wrote a simple code to tell if it sees PNG images, but I'm getting an error. Code: #include #include #include…
FishTuna
  • 19
  • 5
-2
votes
1 answer

Program crashes during texture mapping

I'm currently testing a TextureManager class I'll use in my game project but the problem i have is that the .exe crashes when i'm trying to load 2d textures to a std::map. What i need is that I have a map of pointers to SDL_Textures, keyed with a…
Quit
  • 22
  • 6
-2
votes
1 answer

SDL Image / PNG or JPG cannot be displayed

I am trying to display an png or jpg file with SDL 2.0.1, SDL Image 2.0.0 and c++, but it does not work. (I am new to SDL) I wrote a program that does the following things: Drawing background (is working) Creating random pixels / displaying them…
1 2 3
10
11