Surface.convert

Wraps SDL_ConvertPixels which converts the dsdl2.Surface from its RGB(A) dsdl2.PixelFormat to another dsdl2.Surface with a different RGB(A) dsdl2.PixelFormat

class Surface
const @trusted
convert

Parameters

rgbPixelFormat PixelFormat

the RGB(A) dsdl2.PixelFormat to target the conversion

Return Value

Type: Surface

result dsdl2.Surface with the targetPixelFormat

Throws

dsdl2.SDLException if pixels failed to convert

Meta