Mercurial > hg > digilib
comparison doc/src/site/markdown/java-settings.md @ 1417:e6ad329cfac8
more codec docs.
author | robcast |
---|---|
date | Thu, 22 Oct 2015 17:07:52 +0200 |
parents | 3e2f71bafcfb |
children |
comparison
equal
deleted
inserted
replaced
1416:3e2f71bafcfb | 1417:e6ad329cfac8 |
---|---|
34 You can see if the Jai-ImageIO plugin is active by checking for the | 34 You can see if the Jai-ImageIO plugin is active by checking for the |
35 availability of the TIFF image format under "Supported image types" on the | 35 availability of the TIFF image format under "Supported image types" on the |
36 [`/server/dlConfig.jsp`](http://localhost:8080/digilib/server/dlConfig.jsp) | 36 [`/server/dlConfig.jsp`](http://localhost:8080/digilib/server/dlConfig.jsp) |
37 status page. | 37 status page. |
38 | 38 |
39 Sometimes there are memory issues. Newer versions of Tomcat refuse to load | 39 Sometimes there are problems with leaking memory. Newer versions of Tomcat refuse to load |
40 the libraries (see JREMemoryLeakPreventionListener) and I found that in some | 40 the libraries (see JREMemoryLeakPreventionListener) and I found that in some |
41 cases digilib stopped reading TIFF files | 41 cases digilib stopped reading TIFF files |
42 after a period of running. In these cases it helped to install the JAI files in | 42 after a period of running. In these cases it helped to install the JAI files in |
43 Tomcats `lib/` directory or globally in the local Java JDK | 43 Tomcats `lib/` directory or globally in the local Java JDK |
44 installation (i.e. in the Java's 'jre/lib/ext/' directory on linux). | 44 installation (i.e. in the Java's 'jre/lib/ext/' directory on linux). |
45 | |
46 If you really need to have the imageio-plugins JAR inside the web app, please consider | |
47 using Harald Kuhrs [IIOProviderContextListener](https://github.com/haraldk/TwelveMonkeys#deploying-the-plugins-in-a-web-app). | |
48 | |
45 | 49 |
46 # Codec availability and Performance | 50 # Codec availability and Performance |
47 | 51 |
48 (Ubbo Veentjer, Oct 2015) | 52 (Ubbo Veentjer, Oct 2015) |
49 | 53 |
62 | 66 |
63 1564059 [http-apr-9092-exec-4] DEBUG digilib.image.DocuImage - ImageIO: this reader: class com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader | 67 1564059 [http-apr-9092-exec-4] DEBUG digilib.image.DocuImage - ImageIO: this reader: class com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader |
64 | 68 |
65 (Robert Casties, Oct 2015) | 69 (Robert Casties, Oct 2015) |
66 | 70 |
67 You can now use the TwelveMonkeys codecs instead of the default JAI-ImageIO by [building digilib](build-maven.html) with the Maven-Parameter `imageio=12m`: | 71 You can now use the TwelveMonkeys codecs instead of the default JAI-ImageIO by just [building digilib](build-maven.html) with the Maven-Parameter `imageio=12m`: |
68 | 72 |
69 mvn -Dimageio=12m package | 73 mvn -Dimageio=12m package |
70 | 74 |
71 # Codec performance | 75 # Codec performance |
72 | 76 |
73 (Ubbo Veentjer, Oct 2015) | 77 (Ubbo Veentjer, Oct 2015) |
74 | 78 |
75 In our tests comparing the performance of OpenJDK7, OpenJDK8, imageio-ext and TwelveMonkeys codecs we experienced the following numbers for decoding, encoding and scaling a 4968px*5968px to 50% size: | 79 In our tests comparing the performance of OpenJDK7, OpenJDK8, imageio-ext and TwelveMonkeys codecs we experienced the following numbers for decoding, encoding and scaling a 4968px*5968px JPEG file with a color profile to 50% size: |
76 | 80 |
77 24801 ms - OpenJDK7 | 81 24801 ms - OpenJDK7 |
78 11507 ms - OpenJDK7 with com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader | 82 11507 ms - OpenJDK7 with com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader |
79 4216 ms - OpenJDK7 with imageio-ext using libjpeg-turbo | 83 4216 ms - OpenJDK7 with imageio-ext using libjpeg-turbo |
80 3635 ms - OpenJDK8 | 84 3635 ms - OpenJDK8 |
81 | 85 |
82 This numbers may depend on the actual implementation used, the processing power of the CPU and many other factors, to this are just meant to be a rough hint. | 86 This numbers may depend on the actual implementation used, the processing power of the CPU and many other factors, to this is just meant to be a rough hint. |
83 | 87 |
84 For using imageio-ext, the native library needs to be | 88 For using imageio-ext, the native library needs to be |
85 available with the LD_LIBRARY_PATH environment variable (compare: https://github.com/geosolutions-it/imageio-ext/wiki/TurboJPEG-plugin), also the .jar archives need to be on the classpath. | 89 available with the `LD_LIBRARY_PATH` environment variable (compare: https://github.com/geosolutions-it/imageio-ext/wiki/TurboJPEG-plugin), also the .jar archives need to be on the classpath. |
86 | 90 |
87 For using the TwelveMonkey Codecs we added the following jars to the tomcat lib directory, which were retrieved by maven (dependency on imageio-jpeg-3.1.2): | 91 For using the TwelveMonkey Codecs we added the following jars to the tomcat lib directory, which were retrieved by maven (dependency on imageio-jpeg-3.1.2): |
88 | 92 |
89 * common-image-3.1.2.jar | 93 * common-image-3.1.2.jar |
90 * common-lang-3.1.2.jar | 94 * common-lang-3.1.2.jar |