i converted the output XImage of my code to Bitmap, but the output file is massive, so I thought about compressing it with lzrw, I use this code to write a bitmap to a file
fwrite(&bmpFileHeader, sizeof(bmpFileHeader), 1, fp);
fwrite(&bmpInfoHeader, sizeof(bmpInfoHeader), 1, fp);
fwrite(pImage->data, 4*pImage->width*pImage->height, 1, fp);
anyway, I could write it to (char *) insted (FILE *), so can I use lzrw compression on it? or even better, a way to convert XImage to PNG directly ...
thank
source
share