org.jmage.encoder
Class GifEncoder

java.lang.Object
  extended by org.jmage.encoder.GifEncoder
All Implemented Interfaces:
Configurable, ImageEncoder

public class GifEncoder
extends java.lang.Object
implements ImageEncoder

Encodes Images in GIF format


Field Summary
static org.apache.log4j.Logger log
           
 
Constructor Summary
GifEncoder()
          Default Constructor
 
Method Summary
 boolean canHandle(ImageRequest request)
          Test whether the ImageEncoder can handle the format
 void configure(ApplicationContext context)
          Configure encoder properties
 byte[] createFrom(ImageRequest request)
          Encode the image in the specified format
 void initialize(ImageRequest request)
          Initialize the ImageEncoder for a particular encodingformat in the ImageRequest
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

public static org.apache.log4j.Logger log
Constructor Detail

GifEncoder

public GifEncoder()
Default Constructor

Method Detail

canHandle

public boolean canHandle(ImageRequest request)
Test whether the ImageEncoder can handle the format

Specified by:
canHandle in interface ImageEncoder
Parameters:
request - the ImageRequest
Returns:
[true | false]

configure

public void configure(ApplicationContext context)
Configure encoder properties

Specified by:
configure in interface Configurable
Parameters:
context -

initialize

public void initialize(ImageRequest request)
                throws CodecException
Initialize the ImageEncoder for a particular encodingformat in the ImageRequest

Specified by:
initialize in interface ImageEncoder
Parameters:
request -
Throws:
CodecException

createFrom

public byte[] createFrom(ImageRequest request)
                  throws CodecException
Encode the image in the specified format

Specified by:
createFrom in interface ImageEncoder
Parameters:
request - the imageRequest
Returns:
the encoded image as a byte array.
Throws:
CodecException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004-2008 Sourceforge. All Rights Reserved.