title: flip BMP image horizontal in c
body: <p>My function is getting an Image and I am trying to flip it right or left. horizonal flip. I tried to do something like but don't have idea how to move forward </p>
  
  <p>The size of the image is int height and int width and the function knows the values in pixels.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>void flip_hrizntal_pixels(struct Pixel **pixels, int height, int width)
  {
      //Stuck here don't know how flip those pixels 
      for (int i = 0; i &lt; height; i++)
      {
          for (int j = 0; j &lt; width; j++)
          {
              //pixels[i][j].red = 
              //pixels[i][j].green = 
              //pixels[i][j].blue = 
          }
      }
  
  }
  </code></pre>
  
  <p>here are struct data: </p>
  
  <pre><code>struct Pixel
  {
      unsigned char red;
      unsigned char green;
      unsigned char blue;
  };
  struct RGB_Image
  {
      long height;
      long width;
      long size;
      struct Pixel **pixels;
  };
  </code></pre>
  
  <p>i am calling this function like that :</p>
  
  <pre><code>struct RGB_Image image;
  int status = load_image(&amp;image); 
  flip_hrizntal_pixels(image.pixels, image.height, image.width);
  </code></pre>