CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: reading bimaps

  1. #1
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4

    Question reading bimaps

    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

  2. #2
    Join Date
    Oct 2002
    Location
    Tx, US
    Posts
    208
    I think the best way to compare bitmaps take the hash of the both the bitmaps & then compare the the hash.

    Vinod

  3. #3
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4
    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

  4. #4
    Join Date
    Sep 2000
    Location
    Antwerp, Belgium
    Posts
    101
    take a look at BITMAPFILEHEADER in MSDN
    that should give you a starting point for reading in the structure

    Hope this helps,

    Steven Roelants

  5. #5
    Join Date
    Oct 2002
    Location
    Tx, US
    Posts
    208
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured