blob: 632d890f87fdc0214e3120ef0f3d10a65bacd9ac [file] [log] [blame]
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -07001/*
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 */
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080021
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070022package javax.imageio;
23
24import javax.imageio.metadata.IIOMetadata;
25import javax.imageio.ImageTypeSpecifier;
26
27/**
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080028 * 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
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070036 */
37public interface ImageTranscoder {
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080038
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070039 /**
40 * Converts the specified IIOMetadata object using the specified
41 * ImageWriteParam for obtaining writer's metadata structure.
42 *
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080043 * @param inData
44 * the IIOMetadata.
45 * @param param
46 * the ImageWriteParam.
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070047 * @return the IIOMetadata, or null.
48 */
49 IIOMetadata convertStreamMetadata(IIOMetadata inData, ImageWriteParam param);
50
51 /**
52 * Converts the specified IIOMetadata object using the specified
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080053 * 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.
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070056 *
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080057 * @param inData
58 * the IIOMetadata.
59 * @param imageType
60 * the ImageTypeSpecifier.
61 * @param param
62 * the ImageWriteParam.
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070063 * @return the IIOMetadata, or null.
64 */
The Android Open Source Projecte09fd9e2008-12-17 18:05:43 -080065 IIOMetadata convertImageMetadata(IIOMetadata inData, ImageTypeSpecifier imageType,
66 ImageWriteParam param);
The Android Open Source Project7c1b96a2008-10-21 07:00:00 -070067}