/* for some reason we have to flip the image vertically */ void flipVertical(unsigned char *data, int w, int h){ int x, y, i1, i2; unsigned char temp; for (x=0;x