gray scale palette changes + com out reversal (want to start counting
[my-code/arm.git] / betty / bmp2b.c
index b61ac49..e006609 100644 (file)
@@ -99,7 +99,8 @@ int main(int argc,char **argv) {
                        buf[0]=0;
                        buf[1]=0;
                        for(i=0;i<8;i++) {
-                               pix=((page*8+i)*DX)+col;
+                               // bmp: bottom rows first ... (i forgot that!)
+                               pix=((DY-1-(page*8+i))*DX)+col;
                                b=src.map[pix].r+src.map[pix].g+src.map[pix].b;
                                b/=3;
                                if(b<=(0.25*255)) {