Bmpinfo.c

From AdonaiMedrado.Pro.Br
Revision as of 16:06, 12 June 2009 by Adonaimedrado (Talk | contribs) (New page: <code lang="c"> #include <stdio.h> int main(int argc, char *argv[]) { FILE *fp; int w=0,h=0; fp = fopen(argv[1],"r"); fseek(fp,0x12,SEEK_SET); fread(&w,sizeof(int),1,fp); fread(&h,s...)

(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=0,h=0;
	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;
}