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 8272075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:01:06+00:00 2026-06-08T07:01:06+00:00

At the begin sorry for my English. My purpose is to load rgb array

  • 0

At the begin sorry for my English.

My purpose is to load rgb array from the bitmap. But there is a difference between size of the image and the product of height * width * 3. When i read about bmp format i notice when the widht % 4 is != 0 then i must add to width some digit to equilibrium. (width%4==1 i must add 3, width%4==2 i must add 2 etc.)
Size of the image is 1 442 454 Bytes, height is 601 and width is 801.
804 * 600 * 3 == 1 441 800 and it is more then size of the image.
801 * 600 * 3 == 1441800 it must less then size of the image (even when I add 54 bits of headers). What i must do to read it correctly? (headers are loaded correctly)

  • 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-06-08T07:01:08+00:00Added an answer on June 8, 2026 at 7:01 am

    Note that each row is padded to a multiple of 4 bytes (not pixels).

    So if you have 801 pixels per row and each pixel is 3 bytes (RGB) them you have 801*3=2403 bytes per row and this will be padded with one additional byte to 2404 bytes. The bitmap size will therefore be 601*2404=1444804 bytes.

    If however your row width is only 800 pixels then you have 800*3=2440 bytes per row which is already a multiple of 4 bytes so there will be no additional pad bytes and the bitmap size will be 601*2400=1442400 bytes. With a 54 byte header this gives 1442454 bytes.

    Conclusion: your image size is actually 801 x 600, not 801 x 601.

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

Sidebar

Related Questions

To begin I'm sorry for my english :) I looking for a way to
NOTE : To begin I'm sorry for my english. ;) I plan working on
Sorry, this is very basic, but I can't set the AnimationOption from the default
To begin I'm sorry for my english :) Well, i'm actually learning Rails with
Sorry if there is already made such question earlier, but I have no time
To begin i read all resources from xml in my MergedDictionaries and now I
I'm just begin upgrade my asp.net site from Webform to MVC 2. So far
Sorry for the long post, but most of it is code spelling out my
Sorry for the long question but this contains all the SQL I've used to
Sorry for my bad English... Using Delphi 7 I want to create a dialog

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.