Click to See Complete Forum and Search --> : reading bimaps


smatthews
November 8th, 2002, 10:12 AM
Hi there,

I would like to know how to read a bitmap file as input to a
program. Can you for example use the string handling functions
fgetc() and fgets() or would you use fread()?

I need to be able to compare two bitmaps and return a bool result to indicate that they are identical or non-identical.

In essence how would you go about comparing bitmaps ?
would you be comparing the numerical data for each pixel,
pixel by pixel ?

Help ....,

regards,

steve M

vinodp
November 8th, 2002, 11:01 AM
I think the best way to compare bitmaps take the hash of the both the bitmaps & then compare the the hash.

Vinod

smatthews
November 11th, 2002, 03:29 AM
Dear Vinodp,

I 'm sorry, but I do not understand your reply.
What do you mean by removing the hash ??
Can you please elaborate further,

Thanks,

Steven Matthews

s. roelants
November 11th, 2002, 08:07 AM
take a look at BITMAPFILEHEADER in MSDN
that should give you a starting point for reading in the structure

Hope this helps,

Steven Roelants

vinodp
November 11th, 2002, 12:13 PM
smatthews,
Hashing is cryptographic term.
A hash is simply a "summary", or "tag", which is generated from a digital document using a mathematical rule or algorithm.

Hashing algorithm takes as input a message of arbitrary length and produces as output as fixed length(e.g. 128 bit ) "fingerprint" or "message digest" of the input.

Most importantly, it's very difficult to find two documents that have the same hash.

Its not related to bitmaps its generic cryptographic term. But using this u can easily compare the bitmaps.

Vinod