public class MjpegFileWriter
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
MjpegFileWriter(java.io.File aviFile,
int width,
int height,
double framerate) |
MjpegFileWriter(java.io.File aviFile,
int width,
int height,
double framerate,
int numFrames) |
| Modifier and Type | Method and Description |
|---|---|
void |
addImage(byte[] imagedata) |
void |
addImage(java.awt.Image image) |
void |
addImage(java.awt.Image image,
float quality) |
void |
close() |
void |
finishAVI() |
static byte[] |
intBytes(int i) |
static byte[] |
shortBytes(short i) |
static int |
swapInt(int v) |
static short |
swapShort(short v) |
byte[] |
writeImageToBytes(java.awt.Image image,
float quality) |
public MjpegFileWriter(java.io.File aviFile,
int width,
int height,
double framerate)
throws java.lang.Exception
java.lang.Exceptionpublic MjpegFileWriter(java.io.File aviFile,
int width,
int height,
double framerate,
int numFrames)
throws java.lang.Exception
java.lang.Exceptionpublic void addImage(java.awt.Image image)
throws java.lang.Exception
java.lang.Exceptionpublic void addImage(java.awt.Image image,
float quality)
throws java.lang.Exception
java.lang.Exceptionpublic void addImage(byte[] imagedata)
throws java.lang.Exception
java.lang.Exceptionpublic void finishAVI()
throws java.io.IOException
java.io.IOExceptionpublic static int swapInt(int v)
public static short swapShort(short v)
public static byte[] intBytes(int i)
public static byte[] shortBytes(short i)
public void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic byte[] writeImageToBytes(java.awt.Image image,
float quality)
throws java.lang.Exception
java.lang.Exception