Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6546353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:41:49+00:00 2026-05-25T11:41:49+00:00

I am trying to analyze license plates with C++ code. The point is NOT

  • 0

I am trying to analyze license plates with C++ code. The point is NOT how to get there fast, because I want to go to the process of creating this C++ code myself and learning how to.

Problem:

The bytes in the bitmap file don’t add up! The bitmap file:
enter image description here
http://ictmdeklerk.nl/cor.bmp

Why they dont add up:

I am using 24 bit bitmap images (*.BMP files). I know the bitmap is constructed with the BMPFILEHEADER, and BMPINFOHEADER, which togehter consume 54 bytes.

Now, the image is 1350 pixels wide and 740 pixels high, which results in 999000 pixels.

Because the file is 24 bit, there are 3 bytes per pixel. 999000 * 3 = 2997000 bytes neccessary for the image. But the image size (biSizeImage) in the BMPINFOHEADER says the image is 2998480 bytes! The file size is 2.998.534 bytes – 54 header bytes = 2.998.480 indeed. So the header is still 54 bytes. No extra meta data there. When I divide 2.998.480 / 3 bytes per pixel I get 999493,33 pixels! It is not even a round number!

It is driving me insane. How does windows ever know how to show this image without shifting pixels or colors or anything?

Can anyone explain me where these extra pixels/bytes come from? And how to deal with them?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:41:50+00:00Added an answer on May 25, 2026 at 11:41 am

    BMP files pad each row to 4-byte boundaries.

    Your image is

    (1350px wide) x (3 bytes per pixel) = 4050 bytes per row.
    4050 is not divisible by 4, but 4052 is so 2 bytes for every row (2 * 740 = 1480 bytes) are added as padding to your image.

    The file size is therefore 2997000 image bytes + 54 bytes header + 1480 bytes row padding = 2998534 bytes, which is the actual file size.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This all started because I am trying to FxCop analyze my assembly, which references
I am trying to analyze a JVM crash that is occuring inconsistently. I get
I'm trying to get LinqPad use my dbml model so I could analyze a
I'm trying to analyze core dump, but i get following result. If i make
I have this mysql query that I am trying to analyze. It is very
I am trying to analyze a geotiff file, very simple, just trying to get
When I analyze my code, I get the following Logic Error: The receiver of
I'm trying to analyze some running times for various methods in my default.aspx.cs page.
I am trying to analyze my agent results from a collection of 20 txt
I'm trying to use Purify 6 to analyze a memory corruption in one of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.