#pragma section-numbers off #pragma disable-camelcase = SDL_ConvertPixels = Use this function to copy a block of pixels of one format to another format. <> == Syntax == {{{#!highlight cpp int SDL_ConvertPixels(int width, int height, Uint32 src_format, const void* src, int src_pitch, Uint32 dst_format, void* dst, int dst_pitch) }}} == Function Parameters == ||'''width'''||the width of the block to copy, in pixels|| ||'''height'''||the height of the block to copy, in pixels|| ||'''src_format'''||the format of the source pixels; see [[#Remarks|Remarks]] for details|| ||'''src'''||a pointer to the source pixels|| ||'''src_pitch'''||the pitch of the block to copy|| ||'''dst_format'''||the format of the destination pixels; see [[#Remarks|Remarks]] for details|| ||'''dst'''||a pointer to be filled in with new pixel data|| ||'''dst_pitch'''||the pitch of the destination pixels|| == Return Value == Returns 0 on success or a negative error code on failure; call [[SDL_GetError]]() for more information. == Code Examples == {{{#!highlight cpp You can add your code example here }}} == Remarks == '''src_format''' and '''dst_format''' may each be one of the following [[SDL_PixelFormatEnum]] values: <> ---- [[CategoryAPI]], [[CategorySurface]]