comparison servlet/src/digilib/image/DocuImage.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
22 22
23 import java.awt.Rectangle; 23 import java.awt.Rectangle;
24 import java.io.IOException; 24 import java.io.IOException;
25 import java.io.OutputStream; 25 import java.io.OutputStream;
26 import java.util.Iterator; 26 import java.util.Iterator;
27
28 import javax.servlet.ServletException;
27 29
28 import digilib.io.ImageFile; 30 import digilib.io.ImageFile;
29 import digilib.io.FileOpException; 31 import digilib.io.FileOpException;
30 import digilib.io.ImageInput; 32 import digilib.io.ImageInput;
31 33
68 * 70 *
69 * Currently only mime-types "image/jpeg" and "image/png" are supported. 71 * Currently only mime-types "image/jpeg" and "image/png" are supported.
70 * 72 *
71 * @param mt mime-type of the image to be sent. 73 * @param mt mime-type of the image to be sent.
72 * @param res ServletResponse where the image is sent. 74 * @param res ServletResponse where the image is sent.
73 * @throws FileOpException Exception thrown on any error. 75 * @throws ServletException Exception thrown on sending data.
76 * @throws ImageOpException Exception in other cases.
74 */ 77 */
75 public void writeImage(String mt, OutputStream ostream) 78 public void writeImage(String mt, OutputStream ostream)
76 throws FileOpException; 79 throws ServletException, ImageOpException;
77 80
78 /** The width of the current image in pixel. 81 /** The width of the current image in pixel.
79 * 82 *
80 * @return Image width in pixels. 83 * @return Image width in pixels.
81 */ 84 */
84 /** The height of the current image in pixel. 87 /** The height of the current image in pixel.
85 * 88 *
86 * @return Image height in pixels. 89 * @return Image height in pixels.
87 */ 90 */
88 public int getHeight(); 91 public int getHeight();
92
93 /** The size of the current image in pixel.
94 *
95 * @return
96 */
97 public ImageSize getSize();
89 98
90 /** The mime-type of the current image. 99 /** The mime-type of the current image.
91 * 100 *
92 * @return String the mime-type of this image. 101 * @return String the mime-type of this image.
93 */ 102 */