logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_ConvertPixels - Copy a block of pixels of one format to another format.

Availability

       This function is available since SDL 3.2.0.

Function Parameters

width  the width of the block to copy, in pixels.

       height the height of the block to copy, in pixels.

       src_format
              an SDL_PixelFormat value of the src pixels format.

       src    a pointer to the source pixels.

       src_pitch
              the pitch of the source pixels, in bytes.

       dst_format
              an SDL_PixelFormat value of the dst pixels format.

       dst    a pointer to be filled in with new pixel data.

       dst_pitch
              the pitch of the destination pixels, in bytes.

Name

       SDL_ConvertPixels - Copy a block of pixels of one format to another format.

Return Value

       for more information.

See Also

SDL_ConvertPixelsAndColorspace(3)

Simple Directmedia Layer                           SDL 3.2.20                               SDL_ConvertPixels(3)

Synopsis

#include<SDL3/SDL_surface.h>boolSDL_ConvertPixels(intwidth,intheight,SDL_PixelFormatsrc_format,constvoid*src,intsrc_pitch,SDL_PixelFormatdst_format,void*dst,intdst_pitch);

Thread Safety

       The  same  destination  pixels  should  not  be used from two threads at once. It is safe to use the same
       source pixels from multiple threads.

See Also