SDL Surfaces

This extension provides functions for loading/saving SDL surfaces using Imaging and for converting images to SDL surfaces and vice versa. You need SDL headers for Object Pascal (JEDI-SDL) to compile this extension. It is implemented in ImagingSDL.pas unit located in (ImagingRoot)\Source\Extensions directory. To use it simply add this unit to uses list of your program. Imaging library with this extension can be used as a replacement for SDL_image library if you don't want your application to be dependent on four C dll/so libraries (SDL_image + jpeglib + libpng + zlib).

Here is the table with SDL functions currently available. There is also Imaging SDL demo you can look at for inspiration Object Pascal SDL Demo.

Imaging SDL extension functions
Loading Functions
Saving Functions
Conversion Functions
Note: LoadSDLSurfaceFromFile and similar functions use SDL_SWSURFACE as Flags when creating SDL surface. If you want other Flags to be used load image by standard LoadImageFromFile and similar functions and then call CreateSDLSurfaceFromImage which has more options.