imgLoadJpgRw function

Pointer<SdlSurface> imgLoadJpgRw(
  1. Pointer<SdlRWops> src
)

Load a JPG image directly.

If you know you definitely have a JPG image, you can call this function, which will skip SDL_image's file format detection routines. Generally it's better to use the abstract interfaces; also, there is only an SDL_RWops interface available here.

\param src an SDL_RWops to load image data from. \returns SDL surface, or NULL on error

\since This function is available since SDL_image 2.0.0.

\sa IMG_LoadAVIF_RW \sa IMG_LoadICO_RW \sa IMG_LoadCUR_RW \sa IMG_LoadBMP_RW \sa IMG_LoadGIF_RW \sa IMG_LoadJXL_RW \sa IMG_LoadLBM_RW \sa IMG_LoadPCX_RW \sa IMG_LoadPNG_RW \sa IMG_LoadPNM_RW \sa IMG_LoadSVG_RW \sa IMG_LoadQOI_RW \sa IMG_LoadTGA_RW \sa IMG_LoadTIF_RW \sa IMG_LoadXCF_RW \sa IMG_LoadXPM_RW \sa IMG_LoadXV_RW \sa IMG_LoadWEBP_RW

extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadJPG_RW(SDL_RWops *src)

Implementation

Pointer<SdlSurface> imgLoadJpgRw(Pointer<SdlRWops> src) {
  final imgLoadJpgRwLookupFunction = libSdl2Image.lookupFunction<
      Pointer<SdlSurface> Function(Pointer<SdlRWops> src),
      Pointer<SdlSurface> Function(Pointer<SdlRWops> src)>('IMG_LoadJPG_RW');
  return imgLoadJpgRwLookupFunction(src);
}