Mercurial > hg > digilib-old
comparison servlet/src/digilib/image/DocuImageImpl.java @ 570:fd2ef7e46119
more cleanup, set version to 1.8.2
author | robcast |
---|---|
date | Tue, 21 Dec 2010 20:24:09 +0100 |
parents | 4c51d71aef13 |
children | beeedf90cb81 |
comparison
equal
deleted
inserted
replaced
569:1f666c2b4578 | 570:fd2ef7e46119 |
---|---|
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 | 37 |
52 /** epsilon for float comparisons. */ | 54 /** epsilon for float comparisons. */ |
53 public final double epsilon = 1e-5; | 55 public final double epsilon = 1e-5; |
54 | 56 |
55 /** image mime-type */ | 57 /** image mime-type */ |
56 protected String mimeType = null; | 58 protected String mimeType = null; |
59 | |
60 /** image size */ | |
61 protected ImageSize imgSize = null; | |
57 | 62 |
58 /** | 63 /** |
59 * Returns the quality. | 64 * Returns the quality. |
60 * @return int | 65 * @return int |
61 */ | 66 */ |
151 // TODO Auto-generated method stub | 156 // TODO Auto-generated method stub |
152 return null; | 157 return null; |
153 } | 158 } |
154 | 159 |
155 public int getHeight() { | 160 public int getHeight() { |
156 // TODO Auto-generated method stub | 161 ImageSize is = getSize(); |
162 if (is != null) { | |
163 return is.getHeight(); | |
164 } | |
157 return 0; | 165 return 0; |
158 } | 166 } |
159 | 167 |
160 public int getWidth() { | 168 public int getWidth() { |
161 // TODO Auto-generated method stub | 169 ImageSize is = getSize(); |
170 if (is != null) { | |
171 return is.getWidth(); | |
172 } | |
162 return 0; | 173 return 0; |
174 } | |
175 | |
176 public ImageSize getSize() { | |
177 return imgSize; | |
163 } | 178 } |
164 | 179 |
165 public void loadImage(ImageFile f) throws FileOpException { | 180 public void loadImage(ImageFile f) throws FileOpException { |
166 // TODO Auto-generated method stub | 181 // TODO Auto-generated method stub |
167 | 182 |
171 // TODO Auto-generated method stub | 186 // TODO Auto-generated method stub |
172 | 187 |
173 } | 188 } |
174 | 189 |
175 public void writeImage(String mt, OutputStream ostream) | 190 public void writeImage(String mt, OutputStream ostream) |
176 throws FileOpException { | 191 throws ServletException, ImageOpException { |
177 // TODO Auto-generated method stub | 192 // TODO Auto-generated method stub |
178 } | 193 } |
179 | 194 |
180 } | 195 } |