comparison common/src/main/java/digilib/image/ImageLoaderDocuImage.java @ 1041:81c2378f12ff

put the child back into the bath :-)
author hertzhaft
date Thu, 22 Mar 2012 17:51:52 +0100
parents aef8a02e7ea5
children c1df386f2464
comparison
equal deleted inserted replaced
1040:59fa7b6ae9f7 1041:81c2378f12ff
63 * Implementation of DocuImage using the ImageLoader API of Java 1.4 and Java2D. 63 * Implementation of DocuImage using the ImageLoader API of Java 1.4 and Java2D.
64 */ 64 */
65 public class ImageLoaderDocuImage extends ImageInfoDocuImage { 65 public class ImageLoaderDocuImage extends ImageInfoDocuImage {
66 66
67 /** DocuImage version */ 67 /** DocuImage version */
68 public static final String version = "ImageLoaderDocuImage 2.1.4"; 68 public static final String version = "ImageLoaderDocuImage 2.1.4b";
69 69
70 /** image object */ 70 /** image object */
71 protected BufferedImage img; 71 protected BufferedImage img;
72 72
73 /** the reader object */ 73 /** the reader object */
137 String ver = System.getProperty("java.version"); 137 String ver = System.getProperty("java.version");
138 String os = System.getProperty("os.name"); 138 String os = System.getProperty("os.name");
139 String osver = System.getProperty("os.version"); 139 String osver = System.getProperty("os.version");
140 logger.debug("os="+os+" ver="+osver+" java_version="+ver); 140 logger.debug("os="+os+" ver="+osver+" java_version="+ver);
141 if ((os.startsWith("Linux")) 141 if ((os.startsWith("Linux"))
142 || (os.startsWith("Windows"))
143 || (os.startsWith("Mac OS X") && osver.startsWith("10.7"))) { 142 || (os.startsWith("Mac OS X") && osver.startsWith("10.7"))) {
144 // GRAB(WTF?) works for Linux JDK1.6 with transparency 143 // GRAB(WTF?) works for Linux JDK1.6 with transparency
145 needsInvertRgba = true; 144 needsInvertRgba = true;
146 invertRgbaByteTable = new ByteLookupTable(0, new byte[][] { invertByte, invertByte, orderedByte, invertByte }); 145 invertRgbaByteTable = new ByteLookupTable(0, new byte[][] { invertByte, invertByte, orderedByte, invertByte });
147 needsRescaleRgba = true; 146 needsRescaleRgba = true;
148 needsMapBgr = true; 147 needsMapBgr = true;
149 } else if (os.startsWith("Mac OS X") && osver.startsWith("10.6")) { 148 } else if ((os.startsWith("Mac OS X") && osver.startsWith("10.6"))
149 || (os.startsWith("Windows"))) {
150 needsRescaleRgba = true; 150 needsRescaleRgba = true;
151 } 151 }
152 // this hopefully works for all 152 // this hopefully works for all
153 mapBgrByteTable = new ByteLookupTable(0, new byte[][] { mapR, mapG, mapB }); 153 mapBgrByteTable = new ByteLookupTable(0, new byte[][] { mapR, mapG, mapB });
154 logger.debug("ImageIO Hacks: needsRescaleRgba="+needsRescaleRgba+" needsInvertRgba="+needsInvertRgba+ 154 logger.debug("ImageIO Hacks: needsRescaleRgba="+needsRescaleRgba+" needsInvertRgba="+needsInvertRgba+