JEDI-SDL ships with sdlstreams.pas which wraps up TStream and sdL_rwops. If you use that library it's very easy to use .Originally Posted by arthurprs
There is a function in that unit called
LoadSDLBMPFromStream
Which could easily be changed to use SDL_Image
[pascal]
function LoadSDLImageFromStream( stream : TStream ) : PSDL_Surface;
var
SDL_RWops : PSDL_RWops;
begin
SDL_RWops := SDLStreamSetup( stream );
result := IMG_Load_RW( SDL_RWops, 0 );
SDLStreamCloseRWops( SDL_RWops );
end;
[/pascal]
Bookmarks