Mercurial > hg > digilib-old
comparison servlet/src/digilib/image/DocuImage.java @ 122:a32e8c80e2f2
Servlet Version 1.10b1
- more intelligent handling of resolutions
- different handling of mo=lores
author | robcast |
---|---|
date | Wed, 11 Jun 2003 22:51:28 +0200 |
parents | 78f52a1876fe |
children | 04ad64b2137a |
comparison
equal
deleted
inserted
replaced
121:1ac2c5c6ec0e | 122:a32e8c80e2f2 |
---|---|
12 Please read license.txt for the full details. A copy of the GPL | 12 Please read license.txt for the full details. A copy of the GPL |
13 may be found at http://www.gnu.org/copyleft/lgpl.html | 13 may be found at http://www.gnu.org/copyleft/lgpl.html |
14 | 14 |
15 You should have received a copy of the GNU General Public License | 15 You should have received a copy of the GNU General Public License |
16 along with this program; if not, write to the Free Software | 16 along with this program; if not, write to the Free Software |
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | 18 |
19 */ | 19 */ |
20 | 20 |
21 package digilib.image; | 21 package digilib.image; |
22 | 22 |
23 import java.awt.Rectangle; | 23 import java.awt.Rectangle; |
24 import java.io.File; | 24 import java.io.File; |
25 import java.io.IOException; | |
26 import java.io.OutputStream; | 25 import java.io.OutputStream; |
27 | 26 |
28 import digilib.io.DocuFile; | |
29 import digilib.io.FileOpException; | 27 import digilib.io.FileOpException; |
30 | 28 |
31 /** The basic class for the representation of a digilib image. | 29 /** The basic class for the representation of a digilib image. |
32 * | 30 * |
33 * The actual image object is hidden in the class, only methods for loading, | 31 * The actual image object is hidden in the class, only methods for loading, |
64 * @throws FileOpException | 62 * @throws FileOpException |
65 */ | 63 */ |
66 public void loadSubimage(File f, Rectangle region, int subsample) | 64 public void loadSubimage(File f, Rectangle region, int subsample) |
67 throws FileOpException; | 65 throws FileOpException; |
68 | 66 |
69 /** Checks the size and type of the DocuFile f. | |
70 * | |
71 * The image size and type of the DocuFile f is determined and stored in | |
72 * the DocuFile object. Returns true if successfull. | |
73 * | |
74 * @param f DocuFile to be checked. | |
75 * @return boolean true if check was successfull. | |
76 * @throws FileOpException Exception thrown on error. | |
77 */ | |
78 public boolean checkFile(DocuFile f) throws IOException; | |
79 | |
80 /** Writes the current image to a ServletResponse. | 67 /** Writes the current image to a ServletResponse. |
81 * | 68 * |
82 * The image is encoded to the mime-type <code>mt</code> and sent to the output | 69 * The image is encoded to the mime-type <code>mt</code> and sent to the output |
83 * stream of the <code>ServletResponse</code> <code>res</code>. | 70 * stream of the <code>ServletResponse</code> <code>res</code>. |
84 * | 71 * |