1 package org.jmage.encoder;
2
3 import org.jmage.Configurable;
4 import org.jmage.ImageRequest;
5
6 /***
7 * Encode an Image in an output format
8 */
9 public interface ImageEncoder extends Configurable {
10 /***
11 * Test whether the ImageEncoder can handle the request
12 *
13 * @param request the ImageRequest
14 * @return [true | false]
15 */
16 public boolean canHandle(ImageRequest request);
17
18 /***
19 * Initialize the ImageEncoder for a particular encodingformat using Properties
20 *
21 * @param request
22 */
23 public void initialize(ImageRequest request) throws CodecException;
24
25 /***
26 * Encode the image in the specified format
27 *
28 * @param request the imageRequest
29 * @return the encoded image as a byte array.
30 */
31 public byte[] createFrom(ImageRequest request) throws CodecException;
32 }