How can gdal write a logo to a raster image?

You can make a logo image beforehand, for example 32x32 or 64x64 size, then use gdal to read the raster image, you can read it in chunks, after reading it into memory, generate a bitmap image, draw the logo photo to the image, and then write the image to a new image file (in chunks).