title: What should we do with a Bitmap file when it's rowsize isn't multiple of 4?
body: <p>I am writing a program to rotate an image. The Image format is Bitmap and according to the <a href="http://en.wikipedia.org/wiki/BMP_file_format" rel="nofollow">http://en.wikipedia.org/wiki/BMP_file_format</a> the rowsize of a bitmap image should be multiple of 4. My input image isn't so and when I write new image to a file, it isn't what it should be. Of course first I read the data part to an array of pixels and after that I rotate that array. If more information is needed, please tell me. </p>
  
  <p>Of course my previous problem had been solved but I don't know why c++ count the size of this structure 56 byte ?</p>
  
  <p>Here is the structure: </p>
  
  <pre><code>struct  Bitmap_Header
  {
      char H_Signature[2];
      unsigned int H_Filesize;
      int H_Reserved;
      unsigned int H_DataOffset;
      unsigned int H_Size;
      int H_Width;
      int H_Height;
      short int H_Planes;
      short int H_BitCount;
      unsigned int H_Compression;
      unsigned int H_Imagesize;
      int H_XPixelsPerM;
      int H_YPixelsPerM;
      unsigned int H_ColorsUsed;
      unsigned int H_ColorsImportant;
  };
  </code></pre>