#pragma section-numbers off #pragma disable-camelcase = SDL_GetPixelFormatName = Use this function to get the human readable name of a pixel format. <> == Syntax == {{{#!highlight cpp const char* SDL_GetPixelFormatName(Uint32 format) }}} == Function Parameters == ||'''format'''||the pixel format to query|| == Return Value == Returns the human readable name of the specified pixel format or `"SDL_PIXELFORMAT_UNKNOWN"` if the format isn't recognized. == Code Examples == {{{#!highlight cpp SDL_Surface* surface = ...; // a valid surface from wherever. SDL_PixelFormat* pixelFormat = surface->format; Uint32 pixelFormatEnum = pixelFormat->format; const char* surfacePixelFormatName = SDL_GetPixelFormatName(pixelFormatEnum); SDL_Log("The surface's pixelformat is %s", surfacePixelFormatName); // prints something like "The surface's pixelformat is SDL_PIXELFORMAT_ABGR8888" }}} == Remarks == ''You can add useful comments here'' ##Leave this section as-is unless you have a remark to put in. In that case, replace ''You can add useful comments here'' with your remark(s) following the Style Guide instructions. Leave the rest of the markup alone and delete this comment. == Version == This function is available since SDL 2.0.0. ---- [[CategoryAPI]], [[CategoryPixels]]