#pragma section-numbers off #pragma camelcase off = SDL_AllocFormat = Use this function to create an [[SDL_PixelFormat]] structure corresponding to a pixel format. <> == Syntax == {{{#!highlight cpp SDL_PixelFormat* SDL_AllocFormat(Uint32 pixel_format) }}} == Function Parameters == ||'''pixel_format'''||one of the [[SDL_PixelFormatEnum]] values; see [[#Remarks|Remarks]] for details|| == Return Value == Returns the new [[SDL_PixelFormat]] structure or NULL on failure; call [[SDL_GetError]]() for more information. == Code Examples == {{{#!highlight cpp You can add your code example here }}} == Remarks == '''pixel_format''' may be one of the following: <> Returned structure may come from a shared global cache (i.e. not newly allocated), and hence should not be modified, especially the palette. Weird errors such as {{{Blit combination not supported}}} may occur. == Related Functions == .[[SDL_FreeFormat]] ---- [[CategoryAPI]], [[CategoryPixels]]