Function saveJPGRaw

Wraps IMG_SaveJPG_RW (from SDL_image 2.0.2) which saves a dsdl2.Surface image into a buffer of JPG file format

void[] saveJPGRaw (
  Surface surface,
  ubyte quality
) @trusted;

Parameters

NameDescription
surface given dsdl2.Surface of the image to save
quality value ranging from 0 to 100 specifying the image quality compensating for compression

Returns

dsdl2.SDLException if failed to save