comparison servlet/src/digilib/image/ImageLoaderDocuImage.java @ 543:919e008ab1fb digilibPDF

more steps towards more standard java.util.concurrent design
author robcast
date Thu, 14 Oct 2010 14:24:33 +0200
parents e758a49258e8
children 5ff500d6812a
comparison
equal deleted inserted replaced
542:e2ff961001af 543:919e008ab1fb
177 try { 177 try {
178 img = ImageIO.read(f.getFile()); 178 img = ImageIO.read(f.getFile());
179 if (img == null) { 179 if (img == null) {
180 throw new FileOpException("Unable to load File!"); 180 throw new FileOpException("Unable to load File!");
181 } 181 }
182 mimeType = f.getMimetype();
182 } catch (IOException e) { 183 } catch (IOException e) {
183 throw new FileOpException("Error reading image."); 184 throw new FileOpException("Error reading image.");
184 } 185 }
185 } 186 }
186 187
234 readParam.setSourceSubsampling(prescale, prescale, 0, 0); 235 readParam.setSourceSubsampling(prescale, prescale, 0, 0);
235 } 236 }
236 // read image 237 // read image
237 logger.debug("loading.."); 238 logger.debug("loading..");
238 img = reader.read(0, readParam); 239 img = reader.read(0, readParam);
240 mimeType = f.getMimetype();
239 logger.debug("loaded"); 241 logger.debug("loaded");
240 } catch (IOException e) { 242 } catch (IOException e) {
241 throw new FileOpException("Unable to load File!"); 243 throw new FileOpException("Unable to load File!");
242 } 244 }
243 if (img == null) { 245 if (img == null) {