jezuch.utils.starmapper.encoders
Class PCXEncoder

java.lang.Object
  |
  +--jezuch.utils.starmapper.encoders.ImageEncoder
        |
        +--jezuch.utils.starmapper.encoders.PCXEncoder

public class PCXEncoder
extends ImageEncoder

Internal Starmapper's image encoder using internal PCXWriter.


Nested Class Summary
 
Nested classes inherited from class jezuch.utils.starmapper.encoders.ImageEncoder
ImageEncoder.Parameter
 
Constructor Summary
PCXEncoder()
           
 
Method Summary
 void addImage(RawImage img, int year)
          Encodes another image (for a given Stars!
 void close()
          Closes encoder - useful for animated files, like animated GIF.
 ImageEncoder.Parameter[] getParameters()
          Returns list of parameters accepted by this encoder in Properties passed to initialise() as array of instances of ImageEncoder.Parameter classes.
 void initialise(java.lang.String signature, java.util.Properties props)
          Initializes encoder - useful for animated files, like animated GIF.
 
Methods inherited from class jezuch.utils.starmapper.encoders.ImageEncoder
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PCXEncoder

public PCXEncoder()
Method Detail

addImage

public void addImage(RawImage img,
                     int year)
              throws EncoderException
Description copied from class: ImageEncoder
Encodes another image (for a given Stars! year) - writes it to individual file or adds it to animation sequence.

Specified by:
addImage in class ImageEncoder
Parameters:
img - RawImage containing all needed image information
year - Stars! year which this map comes from
Throws:
EncoderException - thrown on general encoding failure
See Also:
RawImage

close

public void close()
           throws EncoderException
Description copied from class: ImageEncoder
Closes encoder - useful for animated files, like animated GIF. For formats without support for animation implementation of this method is usually empty.

Specified by:
close in class ImageEncoder
Throws:
EncoderException - thrown on general encoding failure

getParameters

public ImageEncoder.Parameter[] getParameters()
Description copied from class: ImageEncoder
Returns list of parameters accepted by this encoder in Properties passed to initialise() as array of instances of ImageEncoder.Parameter classes. If no parameters are needed by this encoder, this method return 0-length array.

Specified by:
getParameters in class ImageEncoder
Returns:
list of encoder's parameters
See Also:
ImageEncoder.Parameter

initialise

public void initialise(java.lang.String signature,
                       java.util.Properties props)
                throws EncoderException
Description copied from class: ImageEncoder
Initializes encoder - useful for animated files, like animated GIF. For formats without support for animation implementation of this method is usually empty. This method is always called by Starmapper before first image is sent to the encoder. It is passing to it runtime parameters in instance of java.util.Properties.

Specified by:
initialise in class ImageEncoder
Parameters:
signature - a signature of game usually used to name images
props - instance of class Properties containing parameters specified at command line, usually format of output image. Set of properties can be empty, names of properties are dependent on encoder implementation and should be properly documented.
Throws:
EncoderException - thrown on general encoding failure