|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.image.AbstractImageFormatter com.bbn.openmap.image.PPMFormatter
public class PPMFormatter
A simple formatter to create PPM images.
I got a simple definition of a PPM image an wrote something to make that. XV complains about the P3 image, but still draws it. No complaints for the P6.
Field Summary | |
---|---|
static int |
HEADER_BUFFER_SIZE
|
static int |
MAX_COLOR_VALUE
|
protected boolean |
rawbits
|
static java.lang.String |
rawbitsMagicNumber
|
static java.lang.String |
RawBitsProperty
|
static java.lang.String |
regularMagicNumber
|
Fields inherited from class com.bbn.openmap.image.AbstractImageFormatter |
---|
bufferedImage, layers, propertiesPrefix |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
---|---|
PPMFormatter()
|
Method Summary | |
---|---|
byte[] |
formatImage(java.awt.image.BufferedImage bi)
Convert a BufferedImage to a image file format... |
java.lang.String |
getContentType()
Get the Mime Content Type created by the ImageFormatter. |
java.lang.String |
getFormatLabel()
Get the Image Type created by the ImageFormatter. |
boolean |
getRawbits()
|
protected boolean |
imageFormatSupportAlphaChannel()
Return true if the image format support alpha channel. |
protected boolean |
imageFormatSupportTransparentPixel()
Return true if the image format support fully transparent pixels. |
ImageFormatter |
makeClone()
Create a new instance of the same type of formatter. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Set the properties of the image formatter. |
void |
setRawbits(boolean rb)
|
Methods inherited from class com.bbn.openmap.image.AbstractImageFormatter |
---|
getBufferedImage, getGraphics, getGraphics, getGraphics, getImageBytes, getImageFromMapBean, getImageFromMapBean, getImageFromMapBean, getProperties, getPropertyInfo, getPropertyPrefix, getScaledBufferedImage, getScaledImageBytes, propertyChange, setBufferedImage, setProperties, setPropertyPrefix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RawBitsProperty
public static final java.lang.String regularMagicNumber
public static final java.lang.String rawbitsMagicNumber
public static final int HEADER_BUFFER_SIZE
public static final int MAX_COLOR_VALUE
protected boolean rawbits
Constructor Detail |
---|
public PPMFormatter()
Method Detail |
---|
public void setProperties(java.lang.String prefix, java.util.Properties props)
AbstractImageFormatter
setProperties
in interface ImageFormatter
setProperties
in interface PropertyConsumer
setProperties
in class AbstractImageFormatter
prefix
- a String used by the PropertyConsumer to prepend
to each property value it wants to look up -
setList.getProperty(prefix.propertyKey). If the prefix
had already been set, then the prefix passed in should
replace that previous value.props
- a Properties object that the PropertyConsumer
can use to retrieve expected properties it can use for
configuration.public ImageFormatter makeClone()
AbstractImageFormatter
makeClone
in interface ImageFormatter
makeClone
in class AbstractImageFormatter
public boolean getRawbits()
public void setRawbits(boolean rb)
public byte[] formatImage(java.awt.image.BufferedImage bi)
AbstractImageFormatter
formatImage
in interface ImageFormatter
formatImage
in class AbstractImageFormatter
bi
- a BufferedImage..public java.lang.String getFormatLabel()
public java.lang.String getContentType()
ImageFormatter
protected boolean imageFormatSupportAlphaChannel()
AbstractImageFormatter
imageFormatSupportAlphaChannel
in class AbstractImageFormatter
protected boolean imageFormatSupportTransparentPixel()
AbstractImageFormatter
imageFormatSupportTransparentPixel
in class AbstractImageFormatter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |