1 |
|
package org.europa.together.business; |
2 |
|
|
3 |
|
import java.awt.image.BufferedImage; |
4 |
|
import java.io.File; |
5 |
|
import java.util.List; |
6 |
|
import org.apache.commons.imaging.common.ImageMetadata.ImageMetadataItem; |
7 |
|
import org.apiguardian.api.API; |
8 |
|
import static org.apiguardian.api.API.Status.STABLE; |
9 |
|
import static org.apiguardian.api.API.Status.DEPRECATED; |
10 |
|
import org.europa.together.exceptions.MisconfigurationException; |
11 |
|
import org.springframework.stereotype.Component; |
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
@author |
18 |
|
@version |
19 |
|
@since |
20 |
|
|
21 |
|
@API(status = STABLE, since = "1.0", consumers = "ImgSclrProcessor") |
22 |
|
@Component |
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
23 |
|
public interface ImageProcessor { |
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
@API(status = STABLE, since = "1.2") |
29 |
|
String FEATURE_ID = "CM-12"; |
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
@API(status = STABLE, since = "3.0") |
35 |
|
String FORMAT_JPEG = "jpeg"; |
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
@API(status = STABLE, since = "1.0") |
41 |
|
String FORMAT_JPG = "jpg"; |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
@API(status = STABLE, since = "1.0") |
47 |
|
String FORMAT_GIF = "gif"; |
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
@API(status = STABLE, since = "1.0") |
53 |
|
String FORMAT_PNG = "png"; |
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
@param |
60 |
|
@return |
61 |
|
|
62 |
|
@API(status = STABLE, since = "1.0") |
63 |
|
boolean loadImage(BufferedImage image); |
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
@param |
70 |
|
@return |
71 |
|
|
72 |
|
@API(status = STABLE, since = "1.0") |
73 |
|
boolean loadImage(File image); |
74 |
|
|
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
@return |
79 |
|
|
80 |
|
@API(status = DEPRECATED, since = "1.1") |
81 |
|
boolean isImageSet(); |
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
@param |
91 |
|
@param |
92 |
|
@param |
93 |
|
@return |
94 |
|
@throws |
95 |
|
|
96 |
|
@API(status = STABLE, since = "1.0") |
97 |
|
boolean saveImage(BufferedImage renderedImage, File file, String format) |
98 |
|
throws MisconfigurationException; |
99 |
|
|
100 |
|
|
101 |
|
|
102 |
|
|
103 |
|
@return |
104 |
|
|
105 |
|
@API(status = STABLE, since = "1.1") |
106 |
|
int getHeight(); |
107 |
|
|
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
@return |
112 |
|
|
113 |
|
@API(status = STABLE, since = "1.1") |
114 |
|
int getWidth(); |
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
@param |
120 |
|
@return |
121 |
|
|
122 |
|
@API(status = STABLE, since = "1.1") |
123 |
|
long getImageSize(BufferedImage image); |
124 |
|
|
125 |
|
|
126 |
|
|
127 |
|
|
128 |
|
@API(status = STABLE, since = "1.0") |
129 |
|
void clearImage(); |
130 |
|
|
131 |
|
|
132 |
|
|
133 |
|
|
134 |
|
|
135 |
|
|
136 |
|
@param |
137 |
|
@param |
138 |
|
@param |
139 |
|
@param |
140 |
|
@return |
141 |
|
@throws |
142 |
|
|
143 |
|
@API(status = STABLE, since = "1.0") |
144 |
|
BufferedImage crop(int x, int y, int height, int width) |
145 |
|
throws MisconfigurationException; |
146 |
|
|
147 |
|
|
148 |
|
|
149 |
|
|
150 |
|
@return |
151 |
|
@throws |
152 |
|
|
153 |
|
@API(status = STABLE, since = "1.0") |
154 |
|
BufferedImage flipHorizontal() throws MisconfigurationException; |
155 |
|
|
156 |
|
|
157 |
|
|
158 |
|
|
159 |
|
@return |
160 |
|
@throws |
161 |
|
|
162 |
|
@API(status = STABLE, since = "1.0") |
163 |
|
BufferedImage flipVertical() throws MisconfigurationException; |
164 |
|
|
165 |
|
|
166 |
|
|
167 |
|
|
168 |
|
@return |
169 |
|
|
170 |
|
@API(status = STABLE, since = "1.0") |
171 |
|
BufferedImage getImage(); |
172 |
|
|
173 |
|
|
174 |
|
|
175 |
|
|
176 |
|
|
177 |
|
|
178 |
|
|
179 |
|
@param |
180 |
|
@return |
181 |
|
@throws |
182 |
|
|
183 |
|
@API(status = STABLE, since = "1.0") |
184 |
|
BufferedImage resize(int percentage) throws MisconfigurationException; |
185 |
|
|
186 |
|
|
187 |
|
|
188 |
|
|
189 |
|
@return |
190 |
|
@throws |
191 |
|
|
192 |
|
@API(status = STABLE, since = "1.0") |
193 |
|
BufferedImage rotateRight() throws MisconfigurationException; |
194 |
|
|
195 |
|
|
196 |
|
|
197 |
|
|
198 |
|
@return |
199 |
|
|
200 |
|
@API(status = STABLE, since = "2.1") |
201 |
|
List<ImageMetadataItem> getMetaData(); |
202 |
|
} |