Index: trunk/Ohana/src/getstar/src/GetFileMode.c
===================================================================
--- trunk/Ohana/src/getstar/src/GetFileMode.c	(revision 16810)
+++ trunk/Ohana/src/getstar/src/GetFileMode.c	(revision 19065)
@@ -5,11 +5,9 @@
 
   char ctype[80];
-  int Naxis, Nx, Ny;
-  int simple, extend, haveNaxis, haveNx, haveNy, haveCTYPE;
+  int Naxis;
+  int simple, extend, haveNaxis, haveCTYPE;
 
   gfits_scan (header, "SIMPLE", "%t", 1, &simple);
   haveNaxis = gfits_scan (header, "NAXIS",  "%d", 1, &Naxis);
-  haveNx    = gfits_scan (header, "NAXIS1", "%d", 1, &Nx);
-  haveNy    = gfits_scan (header, "NAXIS2", "%d", 1, &Ny);
   haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype);
 
Index: trunk/Ohana/src/getstar/src/ReadImageHeader.c
===================================================================
--- trunk/Ohana/src/getstar/src/ReadImageHeader.c	(revision 16810)
+++ trunk/Ohana/src/getstar/src/ReadImageHeader.c	(revision 19065)
@@ -4,5 +4,5 @@
 int ReadImageHeader (Header *header, Image *image) {
 
-  int Nastro, Nx, Ny;
+  int Nastro, Nx, Ny, haveNx, haveNy;
   double tmp;
 
@@ -14,6 +14,17 @@
   // XXX currently, image uses an unsigned short for NX,XY. this is rather restrictive
   // and needs to be at least checked.
-  gfits_scan (header, "NAXIS1",   "%d", 1, &Nx);
-  gfits_scan (header, "NAXIS2",   "%d", 1, &Ny);
+  haveNx = gfits_scan (header, "NAXIS1",   "%d", 1, &Nx);
+  haveNy = gfits_scan (header, "NAXIS2",   "%d", 1, &Ny);
+
+  if (!haveNx && !haveNy) {
+      haveNx = gfits_scan (header, "IMNAXIS1",   "%d", 1, &Nx);
+      haveNy = gfits_scan (header, "IMNAXIS2",   "%d", 1, &Ny);
+  }
+
+  if (!haveNx || !haveNy) {
+      fprintf (stderr, "missing image dimensions in header\n");
+      return (FALSE);
+  }
+
   if ((Nx < 0) || (Nx > 0xffff)) {
     fprintf (stderr, "WARNING: NX, NY out of range : image boundary will be wrong\n");
