title: what is the reason of increasing image size in rotation?
body: <p>I have a c# application that contains an image gallery where I display some pictures.
  This gallery have some features including left and right rotation.
  everything is perfect but when I choose a picture from gallery and press rotation button (regardless left or right rotation), size of the picture increase significantly.
  It should be mentioned that the picture's format is JPEG.</p>
  <p>Size of picture before rotation : 278 kb</p>
  <p>Size of picture after rotation : 780 kb</p>
  <p>My code for rotation is like bellow :</p>
  <pre><code> public Image apply(Image img)
      {  
          Image im = img;
          if (rotate == 1) im.RotateFlip(RotateFlipType.Rotate90FlipNone);
          if (rotate == 2) im.RotateFlip(RotateFlipType.Rotate180FlipNone);
          if (rotate == 3) im.RotateFlip(RotateFlipType.Rotate270FlipNone);
  
          //file size is increasing after RotateFlip method
  
          if (brigh != DEFAULT_BRIGH ||
              contr != DEFAULT_CONTR ||
              gamma != DEFAULT_GAMMA)
          {
              using (Graphics g = Graphics.FromImage(im))
              {
                  float b = _brigh;
                  float c = _contr;
                  ImageAttributes derp = new ImageAttributes();
                  derp.SetColorMatrix(new ColorMatrix(new float[][]{
                          new float[]{c, 0, 0, 0, 0},
                          new float[]{0, c, 0, 0, 0},
                          new float[]{0, 0, c, 0, 0},
                          new float[]{0, 0, 0, 1, 0},
                          new float[]{b, b, b, 0, 1}}));
                  derp.SetGamma(_gamma);
                  g.DrawImage(img, new Rectangle(Point.Empty, img.Size),
                      0, 0, img.Width, img.Height, GraphicsUnit.Pixel, derp);
              }
          }
          return im; 
      }
  </code></pre>
  <p>What is the problem?</p>