blob: 632d890f87fdc0214e3120ef0f3d10a65bacd9ac [file] [log] [blame]
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08001/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17/**
18 * @author Rustem V. Rafikov
19 * @version $Revision: 1.3 $
20 */
21
22package javax.imageio;
23
24import javax.imageio.metadata.IIOMetadata;
25import javax.imageio.ImageTypeSpecifier;
26
27/**
28 * The ImageTranscoder interface is to be implemented by classes that perform
29 * image transcoding operations, that is, take images written in one format and
30 * write them in another format using read/write operations. Some image data can
31 * be lost in such processes. The ImageTranscoder interface converts metadata
32 * objects (IIOMetadata) of ImageReader to appropriate metadata object for
33 * ImageWriter.
34 *
35 * @since Android 1.0
36 */
37public interface ImageTranscoder {
38
39 /**
40 * Converts the specified IIOMetadata object using the specified
41 * ImageWriteParam for obtaining writer's metadata structure.
42 *
43 * @param inData
44 * the IIOMetadata.
45 * @param param
46 * the ImageWriteParam.
47 * @return the IIOMetadata, or null.
48 */
49 IIOMetadata convertStreamMetadata(IIOMetadata inData, ImageWriteParam param);
50
51 /**
52 * Converts the specified IIOMetadata object using the specified
53 * ImageWriteParam for obtaining writer's metadata structure and
54 * ImageTypeSpecifier object for obtaining the layout and color information
55 * of the image for this metadata.
56 *
57 * @param inData
58 * the IIOMetadata.
59 * @param imageType
60 * the ImageTypeSpecifier.
61 * @param param
62 * the ImageWriteParam.
63 * @return the IIOMetadata, or null.
64 */
65 IIOMetadata convertImageMetadata(IIOMetadata inData, ImageTypeSpecifier imageType,
66 ImageWriteParam param);
67}