Sdl_image

Jul 20, 2023

Simple library to load images of various formats as SDL surfaces

This is a simple library to load images of various formats as SDL surfaces. This library supports BMP, PPM, PCX, GIF, JPEG, PNG, TGA, and TIFF formats.

API #include “SDL_image.h”

SDL_Surface *IMG_Loadconst char *file; or
SDL_Surface *IMG_Load_RWSDL_RWops *src, int freesrc; or
SDL_Surface *IMG_Load_RWSDL_RWops *src, int freesrc, char *type;

where type is a string specifying the format i.e. “PNG” or “pcx”. Note that IMG_Load_RW cannot load TGA images.

An example program ‘showimage’ is included, with source in showimage.c



Checkout these related ports:
  • Zphoto - Zooming photo album generator
  • Zint - Barcode generator (library and utilities)
  • Zimg - Image-generator that uses ASCII input files to create PNGs/EDFs
  • Zgv - Graphics viewer for SVGAlib
  • Zbar - ZBar barcode reader
  • Zathura - Customizable lightweight pdf viewer
  • Zathura-ps - PostScript support for Zathura PDF viewer
  • Zathura-pdf-poppler - Poppler render PDF plugin for Zathura PDF viewer
  • Zathura-pdf-mupdf - MuPDF render PDF plugin for Zathura PDF viewer
  • Zathura-djvu - DjVu support for zathura
  • Zathura-cb - Comic book plugin for Zathura PDF viewer
  • Yukon - Real-time capture tool for OpenGL applications
  • Yed - Editor for graphs and diagrams
  • Yafaray - Montecarlo raytracing engine
  • Yacreader - Yet another comic reader