jpeg converter February 17, 2013 02:11PM |
Registered: 11 years ago Posts: 5 |
Re: jpeg converter February 17, 2013 06:15PM |
Admin Registered: 12 years ago Posts: 351 |
// just output binary for use with a display program // write height and width as 2 bytes (high low) if(addhw) { fputc(((UCHAR)(height >> 8) & 0xff), outf); fputc((UCHAR)(height & 0xff), outf); fputc(((UCHAR)(width >> 8) & 0xff), outf); fputc((UCHAR)(width & 0xff), outf); } for(y=0;y<height;y++) { for(x=0;x<width;x++) { BMP_GetPixelRGB(input, x, y, &r, &g, &b ); fputc(r/4, outf); fputc(g/4, outf); fputc(b/4, outf); } }The above is from BMPConvert that will output a binary file for downloading.