Index: trunk/psphot/src/image_stats.c
===================================================================
--- trunk/psphot/src/image_stats.c	(revision 4115)
+++ trunk/psphot/src/image_stats.c	(revision 4215)
@@ -1,8 +1,10 @@
 # include "psphot.h"
 
-psStats *image_stats (psImage *image, psMetadata *config) 
+psStats *image_stats (psImageData *imdata, psMetadata *config) 
 { 
     psStats *stats = NULL;
     psStats *sky   = NULL;
+
+    psImage *image = imdata->image;
 
     // get image stats on a subset of the image (random 1e5 pts)
