how do i take Data from a FIBITMAP (Free-Image image) object and store it into a binary file.
i already know how to store the data as an image but i would like to instead store it as a video akin to Fraps. my goal is to create a list of FIBITMAP images and write to them in a binary (.avi or .mp4 format) file.
this is my ScreenShot Code:
BYTE* pixels = new BYTE[ 3 * width * height];
glReadPixels(0, 0, width, height, GL_BGR, GL_UNSIGNED_BYTE, pixels);
// Convert to FreeImage format & save to file
FIBITMAP* image = FreeImage_ConvertFromRawBits(pixels, width, height, 3 * width, 24, 0x0000FF, 0xFF0000, 0x00FF00);
FreeImage_Save(FIF_PNG, image, "./images/test.avi");
// Free resources
FreeImage_Unload(image);
delete[] pixels;