lt.monarch.image.png
Class PNGEncoder

java.lang.Object
  extended by lt.monarch.image.AbstractEncoder
      extended by lt.monarch.image.png.PNGEncoder
All Implemented Interfaces:
java.io.Serializable

public class PNGEncoder
extends AbstractEncoder

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class lt.monarch.image.AbstractEncoder
image
 
Constructor Summary
Constructor and Description
PNGEncoder()
           
 
Method Summary
Modifier and Type Method and Description
 void encode(java.awt.Image _image, java.io.OutputStream outputStream)
           
 java.lang.String getContentType()
          Returns content type string - 'png'
 void setPhysicalDimension(int xPixelsPerInch, int yPixelsPerInch)
          Sets DPI (dots per inch) of resulting image.
 
Methods inherited from class lt.monarch.image.AbstractEncoder
readObject, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PNGEncoder

public PNGEncoder()
Method Detail

getContentType

public java.lang.String getContentType()
Returns content type string - 'png'

Specified by:
getContentType in class AbstractEncoder
Returns:
content type string

encode

public void encode(java.awt.Image _image,
                   java.io.OutputStream outputStream)
            throws java.io.IOException,
                   java.lang.InterruptedException
Specified by:
encode in class AbstractEncoder
Throws:
java.io.IOException
java.lang.InterruptedException

setPhysicalDimension

public void setPhysicalDimension(int xPixelsPerInch,
                                 int yPixelsPerInch)
Sets DPI (dots per inch) of resulting image.

Parameters:
xPixelsPerInch - number of pixels per inch (horizontal dimension)
yPixelsPerInch - number of pixels per inch (vertical dimension)