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.
Questions tagged [sdl-image]
156 questions
1
vote
1 answer
Access violation at 0x00000000 Loading PNG File With SDL_image Library
I am using the SDL2 2.0.3 library with the SDL_image library 2.0.0 in Visual C++ 2010 Express. I am utilizing the SDL_image library to load a variety of PNG and JPEG files from a resources folder. While the library initializes without any errors…

Bit Fracture
- 651
- 1
- 9
- 24
1
vote
3 answers
CLion does not recognize SDL2_image
I have got SDL2_image library installed on /usr/include/SDL2 (in this directory I can find SDL_image.h).
When I compile with CLion all works fine but, in the editor, either include and functions of SDL2_image librarie appear with error (this library…

Mou
- 2,027
- 1
- 18
- 29
1
vote
2 answers
Flip back textures loaded with SDL_image and used in OpenGL
I am using SDL2 to create a context for OpenGL. I use SDL_image to load the images, and I bind them to OpenGL textures. But because the coordinate system isn't the same the textures are flipped.
I found two ways to correct this:
Modify the texture…

Heckel
- 428
- 9
- 23
1
vote
0 answers
SDL: IMG_load returns wrong data
The problem comes from the "IMG_load" fonction of the SDL_image, with language C.
It raises no error during execution, but when it comes to the line
SDL_Surface* image1 = IMG_Load("image.bmp");
the function returns a data that I can't use: for…

Hellstahl
- 11
- 1
- 4
1
vote
2 answers
How to use SDL locally in Visual Studio 2013
I want to add SDL and SDL_image to my Visual Studio project. But can I do it locally only for this project? I don't want to put the dlls in System32 folder.

user3199819
- 71
- 1
- 5
1
vote
1 answer
How to use JPEG2000 in SDL?
I found that JPEG2000 has an alpha channel, and I want to change PNG format to JPEG2000 in my project which is based on SDL 2.0.3 and SDL_Image. Is it possible to use JPEG2000 in SDL?

loki
- 314
- 4
- 17
1
vote
1 answer
Problem linking SDL_Image against libpng
I'm trying to compile SDL_Image 1.2.10 with MinGW + MSys (gcc 4.5.0) on Windows, I have compiled all the requires libs (zlib 1.2.5, libpng 1.4.2, libjpeg 8a, libtiff 3.9.2). SDL_Image compiles fine, but fails to link to libpng, throwing…

Tim Jones
- 307
- 3
- 11
1
vote
1 answer
Issue loading BMP image using SDL_image
I am new to SDL_image and I am trying to use it in a C file to load a BMP image.
To that end, I have written the following code:
#include "SDL/SDL.h"
#include "SDL_image.h"
SDL_RWops *rwop;
rwop = SDL_RWFromFile("sample.bmp", "rb");
However, for…

Beginner
- 325
- 5
- 16
1
vote
1 answer
SDL2 / SDL Image strange PNG behavior with RGB values
I found an interesting thing that I'm not able to debug but I'd like to solve because it's crucial for the development of a small tool I need.
Basically all reduces to the fact that I load into an SDL_Surface a PNG loaded with…

Jack
- 131,802
- 30
- 241
- 343
1
vote
1 answer
Getting incorrect readings from image
I have made a image of 3x3 with all squares black (0,0,0) unless the corners...
Where I have a red, green, blue and white pixel, as illustrated below:
R, 0, G
0, 0, 0
B, 0, W
Which should be placed as R, 0, G, 0, 0, 0, B, 0, W in the pixeldata…

Ledii
- 261
- 1
- 3
- 13
1
vote
3 answers
C++: Cannot instantiate a pointer directly
This is an SDL problem, however I have the strong feeling that the problem I came across is not related to SDL, but more to C++ / pointers in general.
To make a long story short, this code doesn't work (edited to show what I really…

aheld
- 313
- 1
- 5
- 11
1
vote
2 answers
SDL window close because of SDL_Flip with an image surface array
I am in the beginning of a game of brick breaker type and I'm stuck in the SDL_Flip step. My CodeBlocks compiler says nothing and the console doesn't crash, but yet the SDL window shutdown and the console process returned code 3. When I ran the…

paolovador
- 61
- 1
- 4
1
vote
0 answers
SDL2 configuration on Ubuntu 13.10
i've installed SDL2 (with SDL2_image and SDL2_ttf as well) from sources - SDL2 from http://www.libsdl.org/hg.php , SDL2_image and SDL2_ttf did I find on http://archive.ubuntu.com/ . The project I'm working with (using CodeBlocks) builds…

michj36
- 53
- 7
1
vote
3 answers
Code::Blocks SDL2.0 "undefined reference to 'IMG_Load'"
I'm trying to use c++, SDL, and SDL-image to make a game; I'm using Code::Blocks as my IDE, and I'm having some trouble.
I've downloaded the latest mingw SDL development files, and the latest mingw SDL-image development files.
I've placed all the…

user3290771
- 21
- 1
- 3
1
vote
1 answer
Xcode SDL resources folder
I am making a SDL project in Xcode and I have a folder called resources where my images are stored. For my SDL application to access these images with SDL_LoadBMP the resources folder needs to be in the same folder as the executable file. I don't…

PersonWithName
- 848
- 2
- 13
- 19