
#include "orb.h"

char r,g,b,a;

int main(int argc, char *argv[])
{
	FILE *fi=fopen(argv[1],"rb");
	if (!fi) return 1;
	FILE *fo=fopen(argv[2],"wb");
	if (!fo) return 1;
	fseek(fi,54,SEEK_SET);
	for (int c1=0;c1<256;c1++)
	{
		fread(&b,1,1,fi);b/=4;
		fread(&g,1,1,fi);g/=4;
		fread(&r,1,1,fi);r/=4;
                fread(&a,1,1,fi);
		fwrite(&r,1,1,fo);
		fwrite(&g,1,1,fo);
		fwrite(&b,1,1,fo);
	}

	fclose(fi);
	fclose(fo);
	printf("d'accord\n");
	return 0;
}
