Bmpinfo.c

From AdonaiMedrado.Pro.Br
Revision as of 16:25, 12 June 2009 by Adonaimedrado (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
#include <stdio.h>
 
int main(int argc, char *argv[])
{
	FILE *fp;
	int w,h;
	fp = fopen(argv[1],"r");
	fseek(fp,0x12,SEEK_SET);
	fread(&w,sizeof(int),1,fp);
	fread(&h,sizeof(int),1,fp);
	printf("Largura: %d x Altura: %d\n",w,h);
	fclose(fp);
	return 0;
}