comparison servlet/src/digilib/image/JAIDocuImage.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 686086d6e6d6
comparison
equal deleted inserted replaced
542:e2ff961001af 543:919e008ab1fb
136 public void loadImage(ImageFile f) throws FileOpException { 136 public void loadImage(ImageFile f) throws FileOpException {
137 img = JAI.create("fileload", f.getFile().getAbsolutePath()); 137 img = JAI.create("fileload", f.getFile().getAbsolutePath());
138 if (img == null) { 138 if (img == null) {
139 throw new FileOpException("Unable to load File!"); 139 throw new FileOpException("Unable to load File!");
140 } 140 }
141 mimeType = f.getMimetype();
141 } 142 }
142 143
143 /* Load an image file into the Object. */ 144 /* Load an image file into the Object. */
144 public void loadSubimage(ImageFile f, Rectangle region, int subsample) 145 public void loadSubimage(ImageFile f, Rectangle region, int subsample)
145 throws FileOpException { 146 throws FileOpException {
166 sp.setParameter("interpolation", Interpolation 167 sp.setParameter("interpolation", Interpolation
167 .getInstance(Interpolation.INTERP_NEAREST)); 168 .getInstance(Interpolation.INTERP_NEAREST));
168 // scale 169 // scale
169 logger.debug("loadSubimage: scale"); 170 logger.debug("loadSubimage: scale");
170 img = JAI.create("scale", sp); 171 img = JAI.create("scale", sp);
172 mimeType = f.getMimetype();
171 } 173 }
172 } 174 }
173 175
174 /* Write the current image to an OutputStream. */ 176 /* Write the current image to an OutputStream. */
175 public void writeImage(String mt, OutputStream ostream) 177 public void writeImage(String mt, OutputStream ostream)