Index: /trunk/Ohana/src/kapa2/include/prototypes.h
===================================================================
--- /trunk/Ohana/src/kapa2/include/prototypes.h	(revision 21059)
+++ /trunk/Ohana/src/kapa2/include/prototypes.h	(revision 21060)
@@ -144,4 +144,5 @@
 
 int           Center              PROTO(());
+int           Parity              PROTO(());
 void          SetColorScale       PROTO((Graphic *graphic, KapaImageWidget *image));
 void          SetColorScale1D     PROTO((Graphic *graphic, KapaImageWidget *image));
Index: /trunk/Ohana/src/kapa2/src/Center.c
===================================================================
--- /trunk/Ohana/src/kapa2/src/Center.c	(revision 21059)
+++ /trunk/Ohana/src/kapa2/src/Center.c	(revision 21060)
@@ -31,2 +31,34 @@
 }
 
+int Parity (int sock) {
+
+  int X, Y;
+  Graphic *graphic;
+  Section *section;
+  KapaImageWidget *image;
+
+  KiiScanMessage (sock, "%d %d", &X,  &Y);
+
+  graphic = GetGraphic();
+  section = GetActiveSection();
+  image = section->image;
+  if (image == NULL) return (TRUE);
+
+  image[0].picture.flipx = X;
+  image[0].picture.flipy = Y;
+
+  image[0].zoom.flipx 	 = X;
+  image[0].zoom.flipy 	 = Y;
+
+  image[0].wide.flipx 	 = X;
+  image[0].wide.flipy 	 = Y;
+
+  if (USE_XWINDOW) {
+    Remap (graphic, image);
+    Refresh ();
+    XFlush (graphic[0].display);
+  }
+
+  return (TRUE);
+}
+
Index: /trunk/Ohana/src/kapa2/src/CheckPipe.c
===================================================================
--- /trunk/Ohana/src/kapa2/src/CheckPipe.c	(revision 21059)
+++ /trunk/Ohana/src/kapa2/src/CheckPipe.c	(revision 21060)
@@ -304,4 +304,10 @@
   }
 
+  if (!strcmp (word, "PARI")) {
+    status = Parity (sock);
+    KiiSendCommand (sock, 4, "DONE");
+    FINISHED (status);
+  }
+
   if (!strcmp (word, "NPIX")) {
     GetPixelCount (sock);
Index: /trunk/Ohana/src/kapa2/src/LoadPicture.c
===================================================================
--- /trunk/Ohana/src/kapa2/src/LoadPicture.c	(revision 21059)
+++ /trunk/Ohana/src/kapa2/src/LoadPicture.c	(revision 21060)
@@ -91,4 +91,6 @@
   SetColorScale (graphic, image);
 
+  SetColorScale (graphic, image);
+
   if (!USE_XWINDOW) return (TRUE);
 
Index: /trunk/Ohana/src/libkapa/include/kapa.h
===================================================================
--- /trunk/Ohana/src/libkapa/include/kapa.h	(revision 21059)
+++ /trunk/Ohana/src/libkapa/include/kapa.h	(revision 21060)
@@ -155,4 +155,5 @@
 int KiiResize (int fd, int Nx, int Ny);
 int KiiCenter (int fd, double x, double y, int zoom);
+int KiiParity (int fd, int xflip, int yflip);
 int KapaBox (int fd, Graphdata *graphdata);
 int KapaClearCurrentPlot (int fd);
Index: /trunk/Ohana/src/libkapa/src/KapaWindow.c
===================================================================
--- /trunk/Ohana/src/libkapa/src/KapaWindow.c	(revision 21059)
+++ /trunk/Ohana/src/libkapa/src/KapaWindow.c	(revision 21060)
@@ -5,4 +5,13 @@
   KiiSendCommand (fd, 4, "CENT");
   KiiSendMessage (fd, "%8.3f %8.3f %8d ", x, y, zoom);
+  KiiWaitAnswer (fd, "DONE");
+  
+  return (TRUE);
+}
+
+int KiiParity (int fd, int xflip, int yflip) {
+
+  KiiSendCommand (fd, 4, "PARI");
+  KiiSendMessage (fd, "%2d %2d ", xflip, yflip);
   KiiWaitAnswer (fd, "DONE");
   
Index: /trunk/Ohana/src/opihi/cmd.data/center.c
===================================================================
--- /trunk/Ohana/src/opihi/cmd.data/center.c	(revision 21059)
+++ /trunk/Ohana/src/opihi/cmd.data/center.c	(revision 21060)
@@ -30,2 +30,29 @@
   return (TRUE);
 }
+
+int parity (int argc, char **argv) {
+  
+  int x, y;
+  int kapa, N;
+  char *name;
+  
+  name = NULL;
+  if ((N = get_argument (argc, argv, "-n"))) {
+    remove_argument (N, &argc, argv);
+    name = strcreate (argv[N]);
+    remove_argument (N, &argc, argv);
+  }
+  if (!GetImage (NULL, &kapa, name)) return (FALSE);
+  FREE (name);
+
+  if (argc != 3) {
+    gprint (GP_ERR, "USAGE: parity x y\n");
+    return (FALSE);
+  }
+
+  x = atof (argv[1]);
+  y = atof (argv[2]);
+
+  KiiParity (kapa, x, y);
+  return (TRUE);
+}
