|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.jai.OperationDescriptorImpl
javax.media.jai.operator.EncodeDescriptor
An OperationDescriptor describing the "Encode" operation.
The "Encode" operation writes an image to a given OutputStream
in a specified format using the supplied encoding parameters.
The third parameter contains an instance of
ImageEncodeParam to be used during the decoding. It
may be set to null in order to perform default
encoding, or equivalently may be omitted. If
non-null, it must be of the correct class type for the
selected format.
The classes in the com.sun.media.jai.codec
package are not a committed part of the JAI API. Future releases
of JAI will make use of new classes in their place. This
class will change accordingly.
| Name | Value |
|---|---|
| GlobalName | encode |
| LocalName | encode |
| Vendor | com.sun.media.jai |
| Description | Stores an image to an OutputStream. |
| DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/EncodeDescriptor.html |
| Version | 1.0 |
| arg0Desc | The OutputStream to write to. |
| arg1Desc | The format of the created file. |
| arg2Desc | The encoding parameters. |
| Name | Class Type | Default Value |
|---|---|---|
| stream | java.io.OutputStream | NO_PARAMETER_DEFAULT |
| format | java.lang.String | "tiff" |
| param | com.sun.media.jai.codec.ImageEncodeParam | null |
OperationDescriptor,
Serialized Form| Field Summary |
| Fields inherited from class javax.media.jai.OperationDescriptorImpl |
sourceNames |
| Fields inherited from interface javax.media.jai.OperationDescriptor |
NO_PARAMETER_DEFAULT |
| Constructor Summary | |
EncodeDescriptor()
Constructor. |
|
| Method Summary | |
static RenderedOp |
create(RenderedImage source0,
OutputStream stream,
String format,
ImageEncodeParam param,
RenderingHints hints)
Stores an image to an OutputStream. |
boolean |
isImmediate()
Returns true indicating that the operation should be rendered immediately during a call to JAI.create(). |
boolean |
validateArguments(String modeName,
ParameterBlock args,
StringBuffer msg)
Validates the input source and parameters. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EncodeDescriptor()
| Method Detail |
public boolean validateArguments(String modeName,
ParameterBlock args,
StringBuffer msg)
In addition to the standard checks performed by the
superclass method, this method checks that the format name is
recognized and is capable of encoding the source image using
the encoding parameter "param", if non-null.
validateArguments in interface OperationDescriptorvalidateArguments in class OperationDescriptorImplmodeName - the operation mode nameargs - Input arguments, including source(s) and/or parameter(s).msg - A string that may contain error messages.OperationDescriptorImpl.validateSources(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer),
OperationDescriptorImpl.validateParameters(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)public boolean isImmediate()
JAI.create().
isImmediate in interface OperationDescriptorisImmediate in class OperationDescriptorImplOperationDescriptor
public static RenderedOp create(RenderedImage source0,
OutputStream stream,
String format,
ImageEncodeParam param,
RenderingHints hints)
Creates a ParameterBlockJAI from all
supplied arguments except hints and invokes
JAI.create(String,ParameterBlock,RenderingHints).
source0 - RenderedImage source 0.stream - The OutputStream to write to.format - The format of the created file.
May be null.param - The encoding parameters.
May be null.hints - The RenderingHints to use.
May be null.
RenderedOp destination.
IllegalArgumentException - if source0 is null.
IllegalArgumentException - if stream is null.JAI,
ParameterBlockJAI,
RenderedOp
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||