Mercurial > hg > digilib-old
comparison servlet/src/digilib/image/DocuImage.java @ 149:04ad64b2137a
Servlet version 1.14b1
- better performance with thumbnails (really, this time :-)
- new DocuInfo class
- new Directory class
- DocuFile uses String and Directory as data members
- parameter rearrangements
author | robcast |
---|---|
date | Tue, 26 Aug 2003 22:28:43 +0200 |
parents | a32e8c80e2f2 |
children | e743b853efca |
comparison
equal
deleted
inserted
replaced
148:837a633a0407 | 149:04ad64b2137a |
---|---|
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; | |
25 import java.io.OutputStream; | 24 import java.io.OutputStream; |
26 | 25 |
26 import digilib.io.DocuFile; | |
27 import digilib.io.FileOpException; | 27 import digilib.io.FileOpException; |
28 | 28 |
29 /** The basic class for the representation of a digilib image. | 29 /** The basic class for the representation of a digilib image. |
30 * | 30 * |
31 * 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, |
44 /** Loads an image file into the Object. | 44 /** Loads an image file into the Object. |
45 * | 45 * |
46 * @param f Image File. | 46 * @param f Image File. |
47 * @throws FileOpException Exception thrown if any error occurs. | 47 * @throws FileOpException Exception thrown if any error occurs. |
48 */ | 48 */ |
49 public void loadImage(File f) throws FileOpException; | 49 public void loadImage(DocuFile f) throws FileOpException; |
50 | 50 |
51 /** This DocuImage support the loadSubImage operation. | 51 /** This DocuImage support the loadSubImage operation. |
52 * | 52 * |
53 * @return boolean | 53 * @return boolean |
54 */ | 54 */ |
59 * @param f | 59 * @param f |
60 * @param region | 60 * @param region |
61 * @param subsample | 61 * @param subsample |
62 * @throws FileOpException | 62 * @throws FileOpException |
63 */ | 63 */ |
64 public void loadSubimage(File f, Rectangle region, int subsample) | 64 public void loadSubimage(DocuFile f, Rectangle region, int subsample) |
65 throws FileOpException; | 65 throws FileOpException; |
66 | 66 |
67 /** Writes the current image to a ServletResponse. | 67 /** Writes the current image to a ServletResponse. |
68 * | 68 * |
69 * 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 |
117 * <code>scale</code>. | 117 * <code>scale</code>. |
118 * | 118 * |
119 * @param scale scaling factor | 119 * @param scale scaling factor |
120 * @throws ImageOpException | 120 * @throws ImageOpException |
121 */ | 121 */ |
122 public void scale(double scale) throws ImageOpException; | 122 public void scale(double scaleX, double scaleY) throws ImageOpException; |
123 | 123 |
124 /** Crops and scales the current image. | 124 /** Crops and scales the current image. |
125 * | 125 * |
126 * The current image is cropped to a rectangle of <code>width</code>, | 126 * The current image is cropped to a rectangle of <code>width</code>, |
127 * <code>height</code> at position <code>x_off</code>, <code>y_off</code>. The | 127 * <code>height</code> at position <code>x_off</code>, <code>y_off</code>. The |