Explore BrainMass

Explore BrainMass

    Code for reading Raster Data (Resubmit)

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Dear Champake Mendis, MEngSc (IP),

    Many thanks for your reply, but I would like to resubmit. Please note that I have segmented my character as (10x10) pixels number plates 8-bit. When I used the code provided by Bill Green, TEST.bmp 20 row by 20 column BMP image, I found the right and expected result. However, when I tried to use my own Bitmap characters, for example LetterD I got result which when compared to the actual pixel values in Photoshop, they are completely different. I have attached a folder for you to see. Furthermore, I got the size of the file as 0 and the vector size as -1078. Why? I am using Visual C++ . Please look at it again.

    Reading filename LetterD.bmp
    Width: 10
    Height: 10
    File Size: 0
    # Colors: 256
    Vector Size: -1078

    LetterD (Result using the program) LetterD (Result from Photoshop)

    (0, 0) = 255 (0, 0) = 255
    (0, 1) = 0 (0, 1) =255
    (0, 2) = 0 (0, 2) =255
    (0, 3) = 0 (0, 3) =255
    (0, 4) = 0 (0, 4) = 255
    (0, 5) = 0 (0, 5) = 255
    (0, 6) = 0 (0, 6) = 255
    (0, 7) = 0 (0, 7) = 255
    (0, 8) = 255 (0, 8) = 255
    (0, 9) = 255 (0, 9) = 255
    : :
    : :
    (2, 9) = 255 (2, 9) =0
    : :
    (9, 6) = 255 (9, 6) =255
    (9, 7) = 255 (9, 7) =255
    (9, 8) = 255 (9, 8) = 255
    (9, 9) = 255

    © BrainMass Inc. brainmass.com March 4, 2021, 6:20 pm ad1c9bdddf
    https://brainmass.com/computer-science/cpp/40580

    Attachments

    $2.49

    ADVERTISEMENT