Java Doc for ImageTranscoder.java in  » 6.0-JDK-Core » image » javax » imageio » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » image » javax.imageio 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.imageio.ImageTranscoder

All known Subclasses:   javax.imageio.ImageWriter,
ImageTranscoder
public interface ImageTranscoder (Code)
An interface providing metadata transcoding capability.

Any image may be transcoded (written to a different format than the one it was originally stored in) simply by performing a read operation followed by a write operation. However, loss of data may occur in this process due to format differences.

In general, the best results will be achieved when format-specific metadata objects can be created to encapsulate as much information about the image and its associated metadata as possible, in terms that are understood by the specific ImageWriter used to perform the encoding.

An ImageTranscoder may be used to convert the IIOMetadata objects supplied by the ImageReader (representing per-stream and per-image metadata) into corresponding objects suitable for encoding by a particular ImageWriter. In the case where the methods of this interface are being called directly on an ImageWriter, the output will be suitable for that writer.

The internal details of converting an IIOMetadata object into a writer-specific format will vary according to the context of the operation. Typically, an ImageWriter will inspect the incoming object to see if it implements additional interfaces with which the writer is familiar. This might be the case, for example, if the object was obtained by means of a read operation on a reader plug-in written by the same vendor as the writer. In this case, the writer may access the incoming object by means of its plug-in specific interfaces. In this case, the re-encoding may be close to lossless if the image file format is kept constant. If the format is changing, the writer may still attempt to preserve as much information as possible.

If the incoming object does not implement any additional interfaces known to the writer, the writer has no choice but to access it via the standard IIOMetadata interfaces such as the tree view provided by IIOMetadata.getAsTree. In this case, there is likely to be significant loss of information.

An independent ImageTranscoder essentially takes on the same role as the writer plug-in in the above examples. It must be familiar with the private interfaces used by both the reader and writer plug-ins, and manually instantiate an object that will be usable by the writer. The resulting metadata objects may be used by the writer directly.

No independent implementations of ImageTranscoder are provided as part of the standard API. Instead, the intention of this interface is to provide a way for implementations to be created and discovered by applications as the need arises.
version:
   0.5





Method Summary
 IIOMetadataconvertImageMetadata(IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param)
     Returns an IIOMetadata object that may be used for encoding and optionally modified using its document interfaces or other interfaces specific to the writer plug-in that will be used for encoding.

An optional ImageWriteParam may be supplied for cases where it may affect the structure of the image metadata.

If the supplied ImageWriteParam contains optional setting values not understood by this writer or transcoder, they will be ignored.
Parameters:
  inData - an IIOMetadata object representingimage metadata, used to initialize the state of the returnedobject.
Parameters:
  imageType - an ImageTypeSpecifier indicatingthe layout and color information of the image with which themetadata will be associated.
Parameters:
  param - an ImageWriteParam that will be used toencode the image, or null.

 IIOMetadataconvertStreamMetadata(IIOMetadata inData, ImageWriteParam param)
     Returns an IIOMetadata object that may be used for encoding and optionally modified using its document interfaces or other interfaces specific to the writer plug-in that will be used for encoding.

An optional ImageWriteParam may be supplied for cases where it may affect the structure of the stream metadata.

If the supplied ImageWriteParam contains optional setting values not understood by this writer or transcoder, they will be ignored.
Parameters:
  inData - an IIOMetadata object representingstream metadata, used to initialize the state of the returnedobject.
Parameters:
  param - an ImageWriteParam that will be used toencode the image, or null.




Method Detail
convertImageMetadata
IIOMetadata convertImageMetadata(IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param)(Code)
Returns an IIOMetadata object that may be used for encoding and optionally modified using its document interfaces or other interfaces specific to the writer plug-in that will be used for encoding.

An optional ImageWriteParam may be supplied for cases where it may affect the structure of the image metadata.

If the supplied ImageWriteParam contains optional setting values not understood by this writer or transcoder, they will be ignored.
Parameters:
  inData - an IIOMetadata object representingimage metadata, used to initialize the state of the returnedobject.
Parameters:
  imageType - an ImageTypeSpecifier indicatingthe layout and color information of the image with which themetadata will be associated.
Parameters:
  param - an ImageWriteParam that will be used toencode the image, or null. an IIOMetadata object,or null if the plug-in does not providemetadata encoding capabilities.
exception:
  IllegalArgumentException - if either ofinData or imageType isnull.




convertStreamMetadata
IIOMetadata convertStreamMetadata(IIOMetadata inData, ImageWriteParam param)(Code)
Returns an IIOMetadata object that may be used for encoding and optionally modified using its document interfaces or other interfaces specific to the writer plug-in that will be used for encoding.

An optional ImageWriteParam may be supplied for cases where it may affect the structure of the stream metadata.

If the supplied ImageWriteParam contains optional setting values not understood by this writer or transcoder, they will be ignored.
Parameters:
  inData - an IIOMetadata object representingstream metadata, used to initialize the state of the returnedobject.
Parameters:
  param - an ImageWriteParam that will be used toencode the image, or null. an IIOMetadata object, ornull if the plug-in does not provide metadataencoding capabilities.
exception:
  IllegalArgumentException - if inData isnull.




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.