The Android Open Source Project | 7c1b96a | 2008-10-21 07:00:00 -0700 | [diff] [blame^] | 1 | /* |
| 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 | package javax.imageio; |
| 22 | |
| 23 | import javax.imageio.metadata.IIOMetadata; |
| 24 | import javax.imageio.ImageTypeSpecifier; |
| 25 | |
| 26 | /** |
| 27 | * The ImageTranscoder interface is to be implemented by classes that |
| 28 | * perform image transcoding operations, that is, take images written |
| 29 | * in one format and write them in another format using |
| 30 | * read/write operations. Some image data can be lost in such processes. |
| 31 | * The ImageTranscoder interface converts metadata objects (IIOMetadata) |
| 32 | * of ImageReader to apropriate metadata object for ImageWriter. |
| 33 | */ |
| 34 | public interface ImageTranscoder { |
| 35 | |
| 36 | /** |
| 37 | * Converts the specified IIOMetadata object using the specified |
| 38 | * ImageWriteParam for obtaining writer's metadata structure. |
| 39 | * |
| 40 | * @param inData the IIOMetadata. |
| 41 | * @param param the ImageWriteParam. |
| 42 | * |
| 43 | * @return the IIOMetadata, or null. |
| 44 | */ |
| 45 | IIOMetadata convertStreamMetadata(IIOMetadata inData, ImageWriteParam param); |
| 46 | |
| 47 | /** |
| 48 | * Converts the specified IIOMetadata object using the specified |
| 49 | * ImageWriteParam for obtaining writer's metadata structure |
| 50 | * and ImageTypeSpecifier object for obtaining the layout and |
| 51 | * color information of the image for this metadata. |
| 52 | * |
| 53 | * @param inData the IIOMetadata. |
| 54 | * @param imageType the ImageTypeSpecifier. |
| 55 | * @param param the ImageWriteParam. |
| 56 | * |
| 57 | * @return the IIOMetadata, or null. |
| 58 | */ |
| 59 | IIOMetadata convertImageMetadata(IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param); |
| 60 | } |