Index: trunk/Ohana/src/opihi/cmd.data/ps.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/ps.c	(revision 3693)
+++ trunk/Ohana/src/opihi/cmd.data/ps.c	(revision 5846)
@@ -3,5 +3,5 @@
 int ps (int argc, char **argv) {
 
-  char filename[1024], buffer[64];
+  char filename[1024];
   int N, Source, Nsource, RawImage, NoScale, IsImage;
   
@@ -56,13 +56,5 @@
   
   /* tell Ximage/Xgraph to ps the image */
-  if (RawImage) SendGraphCommand (Source, 4, "PSRW"); 
-  if (NoScale)  SendGraphCommand (Source, 4, "PSNS");
-  if (!RawImage && !NoScale) SendGraphCommand (Source, 4, "PSIT");
-
-  /* I need to fix kapa and kii to read NBYTES, etc like other messages */
-  SendGraphCommand (Source, 16, "LEN: %11d", strlen(filename));
-  write (Source, filename, strlen(filename));
-  read (Source, buffer, 4);
-
+  KiiPS (Source, NoScale, RawImage, filename);
   return (TRUE);
 }
