#define WIDTH 640
#define HEIGHT 480
#include<stdio.h>
#include<stdlib.h>
typedef struct color{
unsigned char r;
unsigned char g;
unsigned char b;
}COLOR;
int main(){
int i, j;
COLOR data[WIDTH][HEIGHT];
FILE *fp;
if((fp
= fopen("image.bmp", "rb")) == NULL
){
fprintf(stderr
, "file open error");
}
for(j=HEIGHT-1; j>=0; j--){
for(i=0; i<WIDTH; i++){
}
}
// 2値画像
return 0;
}
I2RlZmluZSBXSURUSCA2NDAKCiNkZWZpbmUgSEVJR0hUIDQ4MAoKCgojaW5jbHVkZTxzdGRpby5oPgoKI2luY2x1ZGU8c3RkbGliLmg+CgoKCnR5cGVkZWYgc3RydWN0IGNvbG9yewoKICAgIHVuc2lnbmVkIGNoYXIgcjsKCgl1bnNpZ25lZCBjaGFyIGc7CgoJdW5zaWduZWQgY2hhciBiOwoKfUNPTE9SOwoKCgppbnQgbWFpbigpewoKCWludCBpLCBqOwoKCUNPTE9SIGRhdGFbV0lEVEhdW0hFSUdIVF07CgoJRklMRSAqZnA7CgoKCglpZigoZnAgPSBmb3BlbigiaW1hZ2UuYm1wIiwgInJiIikpID09IE5VTEwpewoKCQlmcHJpbnRmKHN0ZGVyciwgImZpbGUgb3BlbiBlcnJvciIpOwoKCQlleGl0KDEpOwoKCX0KCgoKCWZzZWVrKGZwLCA1NCwgU0VFS19TRVQpOwoKCgoJZm9yKGo9SEVJR0hULTE7IGo+PTA7IGotLSl7CgoJCWZvcihpPTA7IGk8V0lEVEg7IGkrKyl7CgoJCQlkYXRhW2ldW2pdLmIgPSBnZXRjKGZwKTsKCgkJCWRhdGFbaV1bal0uZyA9IGdldGMoZnApOwoKCQkJZGF0YVtpXVtqXS5yID0gZ2V0YyhmcCk7CgoJCX0KCgl9CgoJCgoJLy8gMuWApOeUu+WDjwoKCgoKCgoKCWZjbG9zZShmcCk7CgoKCglyZXR1cm4gMDsKCn0=