annotate servlet/src/digilib/image/DocuImage.java @ 532:6d66b4ed7f07 digilibPDF

clean up
author robcast
date Fri, 05 Feb 2010 20:59:18 +0100
parents 9cedd170b581
children 87cb3dc2aa12
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
1 /* DocuImage -- General image interface class
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
2
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
3 Digital Image Library servlet components
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
4
531
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
5 Copyright (C) 2001, 2002, 2003 Robert Casties (robcast@mail.berlios.de)
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
6
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
7 This program is free software; you can redistribute it and/or modify it
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
9 Free Software Foundation; either version 2 of the License, or (at your
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
10 option) any later version.
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
11
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
12 Please read license.txt for the full details. A copy of the GPL
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
13 may be found at http://www.gnu.org/copyleft/lgpl.html
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
14
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
16 along with this program; if not, write to the Free Software
531
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
18
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
19 */
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
20
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
21 package digilib.image;
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
22
531
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
23 import java.awt.Rectangle;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
24 import java.io.IOException;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
25 import java.io.OutputStream;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
26 import java.util.Iterator;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
27
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
28 import digilib.io.ImageFile;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
29 import digilib.io.FileOpException;
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
30
531
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
31 /** The basic class for the representation of a digilib image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
32 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
33 * The actual image object is hidden in the class, only methods for loading,
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
34 * manipulation, and saving are exported. This strategy enables implementations
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
35 * using different toolkits that rely on different image base classes (like
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
36 * JIMI, Java2D and JAI).
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
37 */
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
38 public interface DocuImage {
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
39
531
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
40 /** Loads an image file into the Object.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
41 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
42 * @param f Image File.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
43 * @throws FileOpException Exception thrown if any error occurs.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
44 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
45 public void loadImage(ImageFile f) throws FileOpException;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
46
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
47 /** This DocuImage support the loadSubImage operation.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
48 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
49 * @return boolean
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
50 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
51 public boolean isSubimageSupported();
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
52
531
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
53 /** Load only a subsampled region of the image file.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
54 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
55 * @param f
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
56 * @param region
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
57 * @param subsample
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
58 * @throws FileOpException
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
59 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
60 public void loadSubimage(ImageFile f, Rectangle region, int subsample)
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
61 throws FileOpException;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
62
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
63 /** Writes the current image to a ServletResponse.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
64 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
65 * The image is encoded to the mime-type <code>mt</code> and sent to the output
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
66 * stream of the <code>ServletResponse</code> <code>res</code>.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
67 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
68 * Currently only mime-types "image/jpeg" and "image/png" are supported.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
69 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
70 * @param mt mime-type of the image to be sent.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
71 * @param res ServletResponse where the image is sent.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
72 * @throws FileOpException Exception thrown on any error.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
73 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
74 public void writeImage(String mt, OutputStream ostream)
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
75 throws FileOpException;
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
76
531
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
77 /** The width of the current image in pixel.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
78 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
79 * @return Image width in pixels.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
80 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
81 public int getWidth();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
82
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
83 /** The height of the current image in pixel.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
84 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
85 * @return Image height in pixels.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
86 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
87 public int getHeight();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
88
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
89 /** The mime-type of the current image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
90 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
91 * @return String the mime-type of this image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
92 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
93 public String getMimetype();
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
94
531
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
95 /** Crops the current image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
96 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
97 * Cuts out a region of the size <code>width</code> x <code>height</code> at
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
98 * the offset <code>xoff</code>, <code>yoff</code> from the current image
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
99 * and replaces the current image with the result.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
100 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
101 * @param xoff X offset of crop region
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
102 * @param yoff Y offset of crop region
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
103 * @param width width of crop region
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
104 * @param height height of crop region
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
105 * @throws ImageOpException
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
106 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
107 public void crop(int xoff, int yoff, int width, int height)
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
108 throws ImageOpException;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
109
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
110 /** Scales the current image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
111 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
112 * Replaces the current image with an image scaled by the factor
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
113 * <code>scale</code>.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
114 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
115 * @param scale scaling factor
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
116 * @throws ImageOpException
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
117 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
118 public void scale(double scaleX, double scaleY) throws ImageOpException;
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
119
531
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
120 /** Crops and scales the current image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
121 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
122 * The current image is cropped to a rectangle of <code>width</code>,
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
123 * <code>height</code> at position <code>x_off</code>, <code>y_off</code>. The
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
124 * resulting image is scaled by the factor <code>scale</code> using the
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
125 * interpolation quality <code>qual</code> (0=worst).
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
126 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
127 * @param x_off x offset of the crop rectangle in pixel.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
128 * @param y_off y offset of the crop rectangle in pixel.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
129 * @param width width of the crop rectangle in pixel.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
130 * @param height height of the crop rectangle in pixel.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
131 * @param scale scaling factor.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
132 * @param qual interpolation quality (0=worst).
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
133 * @throws ImageOpException exception thrown on any error.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
134 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
135 public void cropAndScale(
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
136 int x_off,
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
137 int y_off,
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
138 int width,
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
139 int height,
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
140 double scale,
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
141 int qual)
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
142 throws ImageOpException;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
143
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
144 /** Rotates the current image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
145 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
146 * Replaces the current image with a rotated image. The image is rotated
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
147 * around the center by the <code>angle</code>
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
148 * given in degrees [0, 360] clockwise.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
149 * Image size and aspect ratio are likely to change.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
150 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
151 * @param angle rotation angle in degree
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
152 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
153 public void rotate(double angle) throws ImageOpException;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
154
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
155 /** Mirrors the current image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
156 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
157 * Replaces the current image with a mirrored image. The mirror axis goes
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
158 * through the center of the image and is rotated by <code>angle</code>
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
159 * degrees. Currently only horizontal and vertical mirroring (0 and 90
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
160 * degree) are supported.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
161 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
162 * @param angle angle of mirror axis
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
163 * @throws ImageOpException
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
164 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
165 public void mirror(double angle) throws ImageOpException;
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
166
531
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
167 /** Enhances brightness and contrast of the current image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
168 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
169 * Replaces the current image with a brightness and contrast enhanced image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
170 * Contrast is enhanced by multiplying the pixel value with the constant
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
171 * <code>mult</code>. Brightness is enhanced by adding the constant
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
172 * <code>add</code> to the pixel value. Operation: p1 = (p0*mult)+add.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
173 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
174 * @param mult multiplicative constant for contrast enhancement
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
175 * @param add additive constant for brightness enhancement
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
176 * @throws ImageOpException
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
177 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
178 public void enhance(float mult, float add) throws ImageOpException;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
179
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
180 /** Manipulates the colors of the current image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
181 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
182 * Replaces the current image with a color modified image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
183 * For the red, green and blue color channels all pixel values are multiplied
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
184 * by the constant
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
185 * <code>m</code> and added to the constant
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
186 * <code>a</code>. Operation: p1 = (p0*m)+a.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
187 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
188 * @param rgbm multiplicative constants for red, green, blue
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
189 * @param rgba additive constant for red, green, blue
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
190 * @throws ImageOpException
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
191 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
192 public void enhanceRGB(float[] rgbm, float[] rgba)
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
193 throws ImageOpException;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
194
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
195 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
196 * Returns the interpolation quality.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
197 * @return int
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
198 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
199 public int getQuality();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
200
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
201 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
202 * Sets the interpolation quality.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
203 * @param quality The quality to set
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
204 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
205 public void setQuality(int quality);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
206
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
207 /** Frees all resources bound to the DocuImage.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
208 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
209 * Things that should be freed are image objects and open files.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
210 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
211 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
212 public void dispose();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
213
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
214 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
215 * Check image size and type and store in ImageFile f
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
216 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
217 public boolean identify(ImageFile imgf) throws IOException;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
218
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
219 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
220 * Returns a list of supported image formats
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
221 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
222 public Iterator<String> getSupportedFormats();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents: 1
diff changeset
223
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
224 }