/* Program stub to sort Pixels in a Picture  */

#include <MyroC.h>


/* use insertion sort to sort the pixels in the picture array */
void pixelInsertionSort (Pixel pix[], int size)
{
  //CODE HERE
}

int
main ()
{
  rConnect ("/dev/rfcomm0");

  int width, height;
  Picture  pic = rTakePicture();
  width = pic.width;
  height = pic.height;
  
  rDisplayPicture (pic, 5, "unsorted"); // before any changes to pic

  // fill in the following procedure call to apply to the 2D array
  // within the pic struct
  // pixelInsertionSort (/* Pixel ARRAY IN PIC GOES HERE */, width * height);
  
  rDisplayPicture (pic, 5, "sorted"); // after sorting, before corner expansion

  rDisconnect();
  return 0;
} // main
