lt.monarch.image.wbmp
Class WBMPEncoder
java.lang.Object
lt.monarch.image.AbstractEncoder
lt.monarch.image.wbmp.WBMPEncoder
- All Implemented Interfaces:
- java.io.Serializable
public class WBMPEncoder
extends AbstractEncoder
WBMPEncoder create a WBMP file.
- See Also:
- Serialized Form
Constructor Summary
WBMPEncoder()
Empty constructor for WBMPEncoder. |
Method Summary
void |
encode(java.awt.Image image,
java.io.OutputStream outputStream)
Encodes image to the output stream. |
java.lang.String |
getContentType()
Returns content type string - 'wbmp' |
void |
setClearness(float clear)
Set clearness of the picture. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WBMPEncoder
public WBMPEncoder()
- Empty constructor for WBMPEncoder.
getContentType
public java.lang.String getContentType()
- Returns content type string - 'wbmp'
- 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
- Encodes image to the output stream.
- Specified by:
encode in class AbstractEncoder
- Parameters:
image - image which must be encoded into WBMP format.outputStream - WBMP encoded image output stream.
- Throws:
java.io.IOException - if an I/O error occurs. In particular, an IOException
may be thrown if the output stream has been closed.
java.lang.InterruptedException
setClearness
public void setClearness(float clear)
- Set clearness of the picture.
If clearness is 0 then chart is white and
if clearness is 1 then chart is black.
- Parameters:
clear - clear from 0 to 1.