public final class VideoFrameFactory
extends java.lang.Object
VideoFrameFactory
- VideoFrame
factory.Modifier and Type | Method and Description |
---|---|
static VideoFrame |
clone(VideoFrame frame)
Clones
frame . |
static VideoFrame |
load(java.io.File file)
Loads
frame from the file . |
static void |
save(java.io.File file,
java.lang.String format,
VideoFrame frame)
Saves
frame to the file . |
static void |
saveAsJpg(java.io.File file,
VideoFrame frame)
Saves
frame to the JPG file. |
static void |
saveAsPng(java.io.File file,
VideoFrame frame)
Saves
frame to the PNG file. |
static java.awt.image.BufferedImage |
toBufferedImage(VideoFrame frame)
Converts
frame to the BufferedImage . |
static VideoFrame |
toVideoFrame(java.awt.image.BufferedImage image)
Converts
image to the frame . |
static void |
write(java.io.OutputStream os,
java.lang.String format,
VideoFrame frame)
Writes
frame to the os . |
public static VideoFrame clone(VideoFrame frame)
frame
.
Note:
- The method creates a frame.rgb copy.
frame
- frame to clonepublic static java.awt.image.BufferedImage toBufferedImage(VideoFrame frame)
frame
to the BufferedImage
.frame
- public static VideoFrame toVideoFrame(java.awt.image.BufferedImage image)
image
to the frame
.image
- public static void write(java.io.OutputStream os, java.lang.String format, VideoFrame frame) throws java.io.IOException
frame
to the os
.os
- format
- output file formatframe
- video framejava.io.IOException
- if an I/O exception occurredpublic static VideoFrame load(java.io.File file) throws java.io.IOException
frame
from the file
.file
- input filejava.io.IOException
- if an I/O exception occurredpublic static void save(java.io.File file, java.lang.String format, VideoFrame frame) throws java.io.IOException
frame
to the file
.file
- output fileformat
- output file formatframe
- video framejava.io.IOException
- if an I/O exception occurredpublic static void saveAsJpg(java.io.File file, VideoFrame frame) throws java.io.IOException
frame
to the JPG file.file
- output fileframe
- video framejava.io.IOException
- if an I/O exception occurredpublic static void saveAsPng(java.io.File file, VideoFrame frame) throws java.io.IOException
frame
to the PNG file.file
- output fileframe
- video framejava.io.IOException
- if an I/O exception occurred