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
0
votes
1 answer

SDL_Texture from IMG_Load() fails to draw?

The only thing I see is the RenderDrawColor. Also the "circle.png" is in the right folder (where the main.cpp is). #include #include int main(int argc,char* args[]) { SDL_Init(SDL_INIT_EVERYTHING); …
axilirate
  • 11
  • 2
0
votes
1 answer

Linking SDL_image errors

I am running into problems when linking SDL_image in gcc 3 on cygwin under Windows 7. I receive the following error: /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lSDL_image My makefile appears as this: all:…
Oisin
  • 9
  • 1
  • 2
0
votes
0 answers

'SDL2/SDL_image.h' file not found

I'm programming on Xcode. I include SDL_image.h as #include and it says 'SDL2/SDL_image.h' file not found I have installed and linked binary with libraries both SDL2.framework and SDL2_image.framework. I used a Makefile to compile…
lucy yu
  • 1
  • 1
0
votes
1 answer

SDL2 loading files with special characters

I got a problem, that is: in a Windows application using SDL2 & SDL2_Image, it opens image files, for later saving them with modifications on the image data. When it opens an image without special characters (like áéíóúñ, say, "buenos aires.jpg") it…
0
votes
0 answers

Visual Studio - SDL2 - entrypoint not found in libpng 16

While I was working with SDL2 in Visual Studio, I found a error as soon as I wanted to load a png. The Error says: 'Entrypoint "inflateValidate" not found in "C:...\bin\Debug\x64\libpng16-16.dll" My Compiler also outputs this: Exception thrown at…
Rob
  • 1
0
votes
0 answers

IMG_Load: Couldn't open xxx.png

Context: I am currently trying to practice my C skills a little bit with the SDL 2.0.7 and SDL2_image-2.0.2. Problem: I get an error message during the execution of my program "IMG_Load: Couldn't open xxx.png". The error seems stupid as it is very…
ZulKaz
  • 53
  • 1
  • 5
0
votes
1 answer

SDL draw PNG image from raw image data string

I've setup a PNG resource file in my SDL2 project for Windows 32bit in C++. HRSRC hRes = FindResource(0, MAKEINTRESOURCE(IMGID), "PNG"); if (!hRes) { Log::Error("Find resource IMGID"); return; } HGLOBAL hData = LoadResource(0, hRes); if…
Ari Seyhun
  • 11,506
  • 16
  • 62
  • 109
0
votes
0 answers

SDL: Viewport not showing properly

I'm trying to make the pause funcion on the game, when I press esc the games freeze but the menu image doesn't show, what is wrong with the viewport render? You can find the code here: // gcc main.c -o main -lSDL2main -lSDL2 -lSDL_image #include…
0
votes
1 answer

conflicting types when compiling Nim and SDL2 Image with Emscripten

I try to compile a Nim project that uses SDL2 Image with Emscripten, but I get several conflicting types errors. I could reproduce this issue in this small code snippet: index.nim import sdl2, sdl2.image const imgFlags: cint = IMG_INIT_PNG if…
maiermic
  • 4,764
  • 6
  • 38
  • 77
0
votes
1 answer

OpenGL and SDL_Image texture issue

I'm using glew 1.1.0, SDL_image 2.0 and mingw(Code::Blocks, Windows). I'm trying to import an .png file by using SDL_Image and to make it a texture and display to the screen i use OpenGL. When i run the program it displays a pure white square, it…
0
votes
0 answers

CodeBlocks C++ SDL2, PNG images cant be shown outside of the IDE

In my project i have an Animator class, which has a method to load all sprites. SDL_Texture* Animator::CF_createImage_Load( SDL_Renderer* FP_renderer , std::string FV_path ,Uint8 FV_brC1,Uint8 FV_brC2,Uint8 FV_brC3, SDL_Window* window ) { …
0
votes
2 answers

C++ IMG_LoadTexture() returns null

I'm trying to load a image("carnero.png") but when I use IMG_LoadTexture(), it returns null; Game.h #ifndef GAME_H_ #define GAME_H_ #include #include #include class Game { public: Game(); ~Game(); …
Tidder Jail
  • 472
  • 7
  • 11
0
votes
1 answer

glReadPixels swaps blue and red

I'm trying to save a screen region from opengl into a bitmap. I've tried using FreeImage, and SDL_Image, and they both require me to swap red and blue channels. Of course, that brings me to suspect that glReadPixels is the problem here... I have…
Joao Pincho
  • 939
  • 2
  • 11
  • 26
0
votes
1 answer

Configuring libgraph : SDL_Image not found even though it is installed

I got to install libgraph (1.0.1) in my Crunchbang (Debian/7.7) system. Of course you have some dependencies before that. SDL_Image was downloaded and installed from source successfully. I compiled a C++ program with SDL headers to test it out..ran…
devsaw
  • 1,007
  • 2
  • 14
  • 28
0
votes
1 answer

SDL2/SDL_Image loading objcopy files

As stated on the topic, i'm using objcopy to load SDL_Image images with MinGW over Eclipse Helios for windows. I'm using the command: objcopy --input-target binary --output-target pei-i386 --binary-architecture i386 Lilothyn.jpg Lilothyn.o That…
Lilothyn
  • 31
  • 3