]> Creatis software - gdcm.git/blob - src/jpeg/libijg/README.GDCM.txt
13fcdb04078a345e5f075e4586d81d16a7de178c
[gdcm.git] / src / jpeg / libijg / README.GDCM.txt
1 This directory contains a subset of the Independent JPEG Group's (IJG)
2 libjpeg version 6b.  We only include enough of distribution to build
3 libjpeg.  We do not include the standard executables that come with
4 libjpeg (cjpeg, djpeg, etc.). Furthermore, the standard libjpeg build
5 process is replaced with a CMake build process.
6
7 We'd like to thank the IJG for distributing a public JPEG IO library.
8
9 Modifications
10 -------------
11
12 1.
13 jconfig.h is usually generated by the build process. For this distribution,
14 we ship a version of jconfig.h.in to be used across several platforms. It's 
15 purpose is also to allow generation of both 8bits and 12bits lib.
16
17
18
19 2.
20 jdhuff.c was modified to support special Philips MRI image:
21
22 Index: jdhuff.c
23 ===================================================================
24 RCS file: /cvs/public/gdcm/src/jpeg/libijg8/jdhuff.c,v
25 retrieving revision 1.1
26 diff -u -3 -p -r1.1 jdhuff.c
27 --- jdhuff.c    24 Jun 2003 10:09:48 -0000      1.1
28 +++ jdhuff.c    7 Oct 2004 02:29:43 -0000
29 @@ -259,8 +259,11 @@ jpeg_make_d_derived_tbl (j_decompress_pt
30    if (isDC) {
31      for (i = 0; i < numsymbols; i++) {
32        int sym = htbl->huffval[i];
33 -      if (sym < 0 || sym > 15)
34 -       ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
35 +      if (sym < 0 || sym > 15) {
36 +         // Now, we can read Philips MRI Images
37 +         htbl->huffval[i]=15;
38 +//     ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
39 +      }
40      }
41    }
42  }
43
44
45 3.
46 jmorecfg.h was modified so that we can modify it automatically at build time to
47 either generate a 8bits jpeg lib or 12bits jpeg library:
48
49 Index: jmorecfg.h
50 ===================================================================
51 RCS file: /cvs/public/gdcm/src/jpeg/libijg8/jmorecfg.h,v
52 retrieving revision 1.4
53 diff -u -3 -p -r1.4 jmorecfg.h
54 --- jmorecfg.h  31 Oct 2003 14:59:50 -0000      1.4
55 +++ jmorecfg.h  7 Oct 2004 02:30:40 -0000
56 @@ -19,7 +19,8 @@
57   * We do not support run-time selection of data precision, sorry.
58   */
59
60 -#define BITS_IN_JSAMPLE  8     /* use 8 or 12 */
61 +//#define BITS_IN_JSAMPLE  8   /* use 8 or 12 */
62 +#define BITS_IN_JSAMPLE @GDCM_BITS_IN_JSAMPLE@
63
64  /*
65   * Maximum number of components (color channels) allowed in JPEG image.
66
67
68
69
70 4.
71 To further allow us to have to different copy of the 8bits and 12bits jpeg
72 library we had to mangle the name. Fur this purpose two new file were added to
73 the library: gdcm_mangle_8bits.h and gdcm_mangle_12bits.h. Those file were
74 generated using:
75
76         nm libgdcmijpeg8.a | grep " T " | colrm 1 11 | sort
77