Index: /trunk/Ohana/src/addstar/include/addstar.h
===================================================================
--- /trunk/Ohana/src/addstar/include/addstar.h	(revision 35578)
+++ /trunk/Ohana/src/addstar/include/addstar.h	(revision 35579)
@@ -119,4 +119,6 @@
 int    	ACCEPT_TIME;    // accept time stamp (or 0)
 int    	NO_STARS;       // ignore the stars
+int    	NO_DUPLICATE_IMAGES; // allow / skip duplicate images 
+int    	IMAGE_ID_OVERRIDE; // allow / skip duplicate images 
 int    	TEXTMODE;       // force input file to be loaded as RAW
 int     SUBPIX;         // apply a subpix correction
Index: /trunk/Ohana/src/addstar/src/ImageIndex.c
===================================================================
--- /trunk/Ohana/src/addstar/src/ImageIndex.c	(revision 35578)
+++ /trunk/Ohana/src/addstar/src/ImageIndex.c	(revision 35579)
@@ -159,5 +159,5 @@
   if (!index) {
       fprintf (stderr, "image index file is not found, cannot check for image duplicates\n");
-      exit (2);
+      exit (1);
   }
 
Index: /trunk/Ohana/src/addstar/src/UpdateImageIDs.c
===================================================================
--- /trunk/Ohana/src/addstar/src/UpdateImageIDs.c	(revision 35578)
+++ /trunk/Ohana/src/addstar/src/UpdateImageIDs.c	(revision 35579)
@@ -35,4 +35,9 @@
   }
 
+  // TEST IMAGE_ID OVER-RIDE:
+  if (IMAGE_ID_OVERRIDE) {
+    imageID = IMAGE_ID_OVERRIDE;
+  }
+
   // XXX should the first image ID be 1, not 0?
   if (imageID == 0) imageID = 1;
@@ -54,5 +59,7 @@
   // set and update the imageID sequence
   // the file holding the index is created above if this is an empty db
-  CheckDuplicateImageIDs (images, Nimages);
+  if (NO_DUPLICATE_IMAGES) {
+    CheckDuplicateImageIDs (images, Nimages);
+  }
 
   imageID += Nimages;
Index: /trunk/Ohana/src/addstar/src/args.c
===================================================================
--- /trunk/Ohana/src/addstar/src/args.c	(revision 35578)
+++ /trunk/Ohana/src/addstar/src/args.c	(revision 35579)
@@ -308,4 +308,17 @@
   if ((N = get_argument (argc, argv, "-no-stars"))) {
     NO_STARS = TRUE;
+    remove_argument (N, &argc, argv);
+  }
+  /* skip the stars */
+  NO_DUPLICATE_IMAGES = TRUE;
+  if ((N = get_argument (argc, argv, "-dup-images"))) {
+    NO_DUPLICATE_IMAGES = FALSE;
+    remove_argument (N, &argc, argv);
+  }
+  /* skip the stars */
+  IMAGE_ID_OVERRIDE = 0;
+  if ((N = get_argument (argc, argv, "-image-id-override"))) {
+    remove_argument (N, &argc, argv);
+    IMAGE_ID_OVERRIDE = atoi(argv[N]);
     remove_argument (N, &argc, argv);
   }
@@ -438,4 +451,5 @@
   fprintf (stderr, "  -use-name                	  : use the given name instead of the filename as the filename\n");
   fprintf (stderr, "  -no-stars                	  : skip the stars\n");
+  fprintf (stderr, "  -dup-images             	  : skip the test for duplicate image IDs (test only!)\n");
   fprintf (stderr, "  -force                	  : force read of database with inconsistent info\n");
   fprintf (stderr, "  -threads (N)            	  : use N threads for resort option\n");
