Mercurial > hg > digilib-old
comparison servlet/src/digilib/image/ImageSize.java @ 293:126684ac4a37
Servlet version 1.5.0b -- the beginning of the next generation :-)
- code restructuring to improve scaleability
- new Initialiser servlet that must be run first
- image transformation work moved to DigilibImageWorker class
- Maximum number of concurrent threads limited by Semaphore
- old JIMI toolkit implementation removed
author | robcast |
---|---|
date | Sun, 24 Oct 2004 20:23:49 +0200 |
parents | 7a89d105f526 |
children | eec0d8c9c3c9 |
comparison
equal
deleted
inserted
replaced
292:1e7cb24f2406 | 293:126684ac4a37 |
---|---|
204 * Aspect ratio is (width/height). So it's <1 for portrait and >1 for | 204 * Aspect ratio is (width/height). So it's <1 for portrait and >1 for |
205 * landscape. | 205 * landscape. |
206 * | 206 * |
207 * @return | 207 * @return |
208 */ | 208 */ |
209 public double getAspect() { | 209 public float getAspect() { |
210 return (height > 0) ? ((double) width / (double) height) : 0; | 210 return (height > 0) ? ((float) width / (float) height) : 0; |
211 } | 211 } |
212 | 212 |
213 /* (non-Javadoc) | 213 /* (non-Javadoc) |
214 * @see java.lang.Object#toString() | 214 * @see java.lang.Object#toString() |
215 */ | 215 */ |
216 public String toString() { | 216 public String toString() { |
217 String s = "[" + width + "x" + height + "]"; | 217 String s = "[" + width + "x" + height + "]"; |
218 // TODO Auto-generated method stub | |
219 return s; | 218 return s; |
220 } | 219 } |
221 } | 220 } |