Bitmap Image file Validator/Checker

2 Apr

I’ve created this program as a part of a project ‘Image Enhancer’. This Program can be used to check whether the given file is a valid BMP file or not. Just compile the source code and enter the absolute file path in the prompt. (Ex-c:\test\text.bmp)

//Checking and validation of an BMP ImageFile
#define BMPTYPE (((WORD) ‘M’ << must=”=”‘BM'” ex=”c:\tc\text.bmp):” length =” strlen(inname);” i =” 0;”>= ‘a’) && (inname[i] <= ‘z’)){
inname[i] = toupper(inname[i]);
FILE *infp;
//strcpy( inname, argv[1]);
infp = fopen( inname, “r”);
if( ! infp)
printf(“\n Unable to open %s for input\n”, inname);
printf(“Try again..”);
// exit(1);
printf(“Verifying file….”);
printf(“\nPress any key to exit\n”);
// exit(0);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: