public static unsafe Texture LoadTexture(Renderer renderer, RWOps src, string?type = null) { if (type == null) { return(ErrorIfInvalid(IMG_LoadTexture_RW(renderer, src, 0))); } else { Span <byte> buf = stackalloc byte[SL(type)]; StringToUTF8(type, buf); fixed(byte *b = buf) return(ErrorIfInvalid(IMG_LoadTextureTyped_RW(renderer, src, 0, b))); } }
public static unsafe Surface Load(RWOps src, string?type = null) { if (type == null) { return(ErrorIfInvalid(IMG_Load_RW(src, 0))); } else { Span <byte> buf = stackalloc byte[SL(type)]; StringToUTF8(type, buf); fixed(byte *b = buf) return(ErrorIfInvalid(IMG_LoadTyped_RW(src, 0, b))); } }
public static Surface LoadWEBP(RWOps ops) => ErrorIfInvalid(IMG_LoadWEBP_RW(ops));
public static extern int IMG_isWEBP(RWOps src);
public static extern int IMG_isTIF(RWOps src);
public static extern int IMG_isPNM(RWOps src);
public static extern int IMG_isCUR(RWOps src);
public static extern Texture IMG_LoadTextureTyped_RW(Renderer renderer, RWOps src, int freesrc, /*const char*/ byte *type);
public static extern Surface IMG_Load_RW(RWOps src, int freesrc);
public static bool IsBMP(RWOps ops) => IMG_isBMP(ops) == 1;
public static bool IsCUR(RWOps ops) => IMG_isCUR(ops) == 1;
public static bool IsICO(RWOps ops) => IMG_isICO(ops) == 1;
public static void SaveJPG(Surface surface, RWOps dst, int quality) { ErrorIfNegative(IMG_SaveJPG_RW(surface, dst, 0, quality)); }
public static void SavePNG(Surface surface, RWOps dst) { ErrorIfNegative(IMG_SavePNG_RW(surface, dst, 0)); }
public static extern int IMG_SaveJPG_RW(Surface surface, RWOps dst, int freedst, int quality);
public static bool IsGIF(RWOps ops) => IMG_isGIF(ops) == 1;
public static extern Surface IMG_LoadTyped_RW(RWOps src, int freesrc, /*const char*/ byte *type);
public static bool IsJPG(RWOps ops) => IMG_isJPG(ops) == 1;
public static extern Texture IMG_LoadTexture_RW(Renderer renderer, RWOps src, int freesrc);
public static bool IsLBM(RWOps ops) => IMG_isLBM(ops) == 1;
public static extern int IMG_isICO(RWOps src);
public static bool IsPCX(RWOps ops) => IMG_isPCX(ops) == 1;
public static extern int IMG_isBMP(RWOps src);
public static bool IsPNM(RWOps ops) => IMG_isPNM(ops) == 1;
public static extern int IMG_isSVG(RWOps src);
public static extern Surface IMG_LoadWEBP_RW(RWOps src);
public static extern int IMG_isXV(RWOps src);
public static extern int IMG_SavePNG_RW(Surface surface, RWOps dst, int freedst);
public static extern Surface IMG_LoadLBM_RW(RWOps src);
public static Surface LoadXPM(RWOps ops) => ErrorIfInvalid(IMG_LoadXPM_RW(ops));