Mercurial > hg > digilib-old
comparison servlet/src/digilib/image/DocuImageImpl.java @ 573:beeedf90cb81 stream
Merge from HEAD
fd2ef7e461198ef4a9d9a02459be2057038d600d
author | robcast |
---|---|
date | Wed, 22 Dec 2010 09:54:34 +0100 |
parents | 50f291d808b1 fd2ef7e46119 |
children | aee436f0549d |
comparison
equal
deleted
inserted
replaced
568:34701340922e | 573:beeedf90cb81 |
---|---|
26 import java.io.OutputStream; | 26 import java.io.OutputStream; |
27 import java.util.Iterator; | 27 import java.util.Iterator; |
28 import java.util.LinkedList; | 28 import java.util.LinkedList; |
29 import java.util.List; | 29 import java.util.List; |
30 | 30 |
31 import javax.servlet.ServletException; | |
32 | |
31 import org.apache.log4j.Logger; | 33 import org.apache.log4j.Logger; |
32 | 34 |
33 import digilib.io.FileOpException; | 35 import digilib.io.FileOpException; |
34 import digilib.io.ImageFile; | 36 import digilib.io.ImageFile; |
35 import digilib.io.ImageInput; | 37 import digilib.io.ImageInput; |
53 /** epsilon for float comparisons. */ | 55 /** epsilon for float comparisons. */ |
54 public final double epsilon = 1e-5; | 56 public final double epsilon = 1e-5; |
55 | 57 |
56 /** image mime-type */ | 58 /** image mime-type */ |
57 protected String mimeType = null; | 59 protected String mimeType = null; |
60 | |
61 /** image size */ | |
62 protected ImageSize imgSize = null; | |
58 | 63 |
59 /** | 64 /** |
60 * Returns the quality. | 65 * Returns the quality. |
61 * @return int | 66 * @return int |
62 */ | 67 */ |
152 // TODO Auto-generated method stub | 157 // TODO Auto-generated method stub |
153 return null; | 158 return null; |
154 } | 159 } |
155 | 160 |
156 public int getHeight() { | 161 public int getHeight() { |
157 // TODO Auto-generated method stub | 162 ImageSize is = getSize(); |
163 if (is != null) { | |
164 return is.getHeight(); | |
165 } | |
158 return 0; | 166 return 0; |
159 } | 167 } |
160 | 168 |
161 public int getWidth() { | 169 public int getWidth() { |
162 // TODO Auto-generated method stub | 170 ImageSize is = getSize(); |
171 if (is != null) { | |
172 return is.getWidth(); | |
173 } | |
163 return 0; | 174 return 0; |
175 } | |
176 | |
177 public ImageSize getSize() { | |
178 return imgSize; | |
164 } | 179 } |
165 | 180 |
166 public void loadImage(ImageFile f) throws FileOpException { | 181 public void loadImage(ImageFile f) throws FileOpException { |
167 // TODO Auto-generated method stub | 182 // TODO Auto-generated method stub |
168 | 183 |
172 // TODO Auto-generated method stub | 187 // TODO Auto-generated method stub |
173 | 188 |
174 } | 189 } |
175 | 190 |
176 public void writeImage(String mt, OutputStream ostream) | 191 public void writeImage(String mt, OutputStream ostream) |
177 throws FileOpException { | 192 throws ServletException, ImageOpException { |
178 // TODO Auto-generated method stub | 193 // TODO Auto-generated method stub |
179 } | 194 } |
180 | 195 |
181 } | 196 } |