title: Flipping Image horizontally C++
body: <p>I got a problem with the flipping because only right part is shown, rest of picture is only grey.</p>
  
  <pre><code>![Lena FLipped][1]    
  
  Image *im2 = new Image();
  im2-&gt;CloneImage(image);
  
  unsigned int sizeX = im2-&gt;GetSizeX();
  unsigned int sizeY = im2-&gt;GetSizeY();
  
  for(int x = 0; x &lt; sizeX/2;x++){
     for(int y = 0;y &lt; sizeY;y++ ){
  
         Image::PixelType pix = im2-&gt;GetPixel(x,y);
         im2-&gt;SetPixel(x,y,sizeX-x-1);
         im2-&gt;SetPixel(sizeX-x-1,y,pix);
     }
  }
  ImageIO::Write( "flip.pgm", im2 );
  </code></pre>