|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jinx.video.processor.ImageSaver
public class ImageSaver
ImageSaver is a PostProcessor that saves each rendered frame to disk. This
should always be the last PostProcessor in the array passed to the renderer.
API Stability: Stable.
Constructor Summary | |
---|---|
ImageSaver(java.io.File dir,
java.lang.String format)
Constructs an ImageSaver. |
|
ImageSaver(java.io.File dir,
java.lang.String format,
int imageType)
Constructs an ImageSaver. |
|
ImageSaver(java.lang.String dir,
java.lang.String format)
Constructs an ImageSaver. |
|
ImageSaver(java.lang.String dir,
java.lang.String format,
int imageType)
Constructs an ImageSaver. |
Method Summary | |
---|---|
protected boolean |
canProcess()
Used to determine if processing can occur for the current frame. |
void |
deinit(Context opt)
Does nothing. |
void |
init(Context opt)
Does nothing. |
protected java.io.File |
nextFile()
Determines and returns the next File object to save an image to. |
void |
process(Context context,
java.awt.Rectangle viewport)
Processes what's currently in the frame buffer and saves it as an image file, but only if canProcess() and shouldProcess() both return true. |
protected boolean |
shouldProcess()
Used to determine if processing should occur for the current frame. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageSaver(java.lang.String dir, java.lang.String format, int imageType)
dir
- the directory to put the images in.format
- the informal format name to use. This is typically the
same as the extension used in an image file name. Examples: "bmp",
"jpg", "png", etc.imageType
- this will be one of the type constants from
java.awt.image.BufferedImage.
java.lang.IllegalArgumentException
- if any of the arguments aren't quite
right.
ImageFormatException
- if the format String doesn't match one of
the supported formats.
java.lang.NullPointerException
- if dir is null.public ImageSaver(java.lang.String dir, java.lang.String format)
dir
- the directory to put the images in.format
- the informal format name to use. This is typically the
same as the extension used in an image file name. Examples: "bmp",
"jpg", "png", etc.
java.lang.IllegalArgumentException
- if any of the arguments aren't quite
right.
ImageFormatException
- if the format String doesn't match one of
the supported formats.
java.lang.NullPointerException
- if dir is null.public ImageSaver(java.io.File dir, java.lang.String format)
dir
- the directory to put the images in.format
- the informal format name to use. This is typically the
same as the extension used in an image file name. Examples: "bmp",
"jpg", "png", etc.
java.lang.IllegalArgumentException
- if any of the arguments aren't quite
right.
ImageFormatException
- if the format String doesn't match one of
the supported formats.
java.lang.NullPointerException
- if dir is null.public ImageSaver(java.io.File dir, java.lang.String format, int imageType)
dir
- the directory to put the images in.format
- the informal format name to use. This is typically the
same as the extension used in an image file name. Examples: "bmp",
"jpg", "png", etc. If this is null, "png" will be used.imageType
- this will be one of the type constants from
java.awt.image.BufferedImage.
java.lang.IllegalArgumentException
- if any of the arguments aren't quite
right.
ImageFormatException
- if the format String doesn't match one of
the supported formats.
java.lang.NullPointerException
- if dir is null.Method Detail |
---|
protected java.io.File nextFile()
protected boolean shouldProcess()
protected final boolean canProcess()
public void init(Context opt)
init
in interface FrameProcessor
opt
- the Context object providing data on how rendering should
proceed.public void deinit(Context opt)
deinit
in interface FrameProcessor
opt
- the Context object providing data on how rendering should
proceed.public void process(Context context, java.awt.Rectangle viewport)
process
in interface FrameProcessor
context
- describes the rendering options that are being used.viewport
- a Rectangle describing the current bounds for rendering.
If this FrameProcessor is attached to a View, this will be the view's
viewport. If this FrameProcessor is attached to a SplitScreenRenderer,
then viewport will represent the entire drawing area for the renderer.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |