Use libpng or libjpg. They are installed on most Linux systems. It wouldnât very hard follow its documentation and theyâll save you from many troubles. You can also use SDL_Image if you are using SDL in order to load the textures directly from .jpg or .png files.
Originally posted by zeedee: NO itâs only âjpegâ. InterestingâŚ
Make sure you also install the development packages e.g.: .h files and import libraries. On my system:
most of the GNU/Linux distributions come with a great library called âGdkPixbufâ.
look if it is installed on your system:
pkg-config --list-all | grep âGdkPixbufâ
if it is installed you will get the following result:
gdk-pixbuf-xlib-2.0 GdkPixbuf Xlib - GdkPixbuf rendering for Xlib
gdk-pixbuf-2.0 GdkPixbuf - Image loading and scaling
I canât find the libjpg in the gentoo portage:(
Just install it yourself, then. LibPNG is rather easy to compile/install (note that you do need zlib as well). Heck, I installed it on my MinGW/MSYS Win32 box.