c++ - GD: How to add the text string to the RGB24 buffer image? -
i have rgb24 format stream. each buffer video frame. need add text each frame. problem don't know libgd has method add buffer background rgb24 raw. ideas how that?
void * addhello(void * prgb24raw) { int black; gdimageptr im; im = gdimagecreatetruecolor(320,240); // here should set background prgb24raw pointer black = gdimagecolorresolvealpha(im, 0, 0, 0, gdalphaopaque); gdimagestringft (im, null, black, "arial", 12, 0, 2, 14, "hello"); // here should copy modified buffer prgb24raw pointer gdimagedestroy (im); return prgb24raw; }
Comments
Post a Comment