SDL_PremultiplyAlpha

Premultiply the alpha on a block of pixels.

This is safe to use with src == dst, but not for other overlapping areas.

extern (C) nothrow @nogc extern
bool
SDL_PremultiplyAlpha

Parameters

width int

the width of the block to convert, in pixels.

height int

the height of the block to convert, in pixels.

src_format SDL_PixelFormat

an SDL_PixelFormat value of the src pixels format.

src const(void)*

a pointer to the source pixels.

src_pitch int

the pitch of the source pixels, in bytes.

dst_format SDL_PixelFormat

an SDL_PixelFormat value of the dst pixels format.

dst void*

a pointer to be filled in with premultiplied pixel data.

dst_pitch int

the pitch of the destination pixels, in bytes.

linear bool

true to convert from sRGB to linear space for the alpha multiplication, false to do multiplication in sRGB space.

Return Value

Type: bool

true on success or false on failure; call SDL_GetError() for more information.

Meta