src/hg/visiGene/vgPrepImage/jp2Dec.c 1.2

1.2 2010/01/28 00:24:46 galt
trying to get it to compile, using dynamic libjpeg since static no longer easily available, changing jpeg2000 dependency to default off since most people will not need it, using jpgTilesX.h as a minimal include file removes the conflict over "boolean" between common.h and libjpeg.h
Index: src/hg/visiGene/vgPrepImage/jp2Dec.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/visiGene/vgPrepImage/jp2Dec.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -B -U 4 -r1.1 -r1.2
--- src/hg/visiGene/vgPrepImage/jp2Dec.c	13 Feb 2006 06:57:05 -0000	1.1
+++ src/hg/visiGene/vgPrepImage/jp2Dec.c	28 Jan 2010 00:24:46 -0000	1.2
@@ -1,4 +1,6 @@
+#ifdef USE_JPG2000
+
 /****************************************************
 ** 
 ** FILE:   	jp2Dec.c  (derived from ecw jp2 sdk example4.c)
 ** CREATED:	2006-02-10
@@ -216,4 +218,29 @@
 NCScbmCloseFileView(pNCSFileView);
 NCSecwShutdown();
 }
 
+
+
+#else
+
+#include <stdarg.h>
+#include "common.h"
+#include "errabort.h"
+
+void jp2DecInit(char *jp2Path, int *retWidth, int *retHeight)
+{
+errnoAbort("No jpg2000 libraries available: %s %d %d", jp2Path, *retWidth, *retHeight);
+}
+
+unsigned char *jp2ReadScanline()
+{
+errnoAbort("No jpg2000 libraries available.");
+return NULL;  // never gets here
+}
+
+void jp2Destroy()
+{
+errnoAbort("No jpg2000 libraries available.");
+}
+
+#endif