public class CameraFormat extends Object implements Comparable<CameraFormat>
CameraFormat represents the image size and frame rate with which
a video input device is capturing frames. CameraFormat also implements
Comparable to compare the image size with other formats.| Constructor and Description |
|---|
CameraFormat()
Create a new
CameraFormat with image size and frame rate equal zero. |
CameraFormat(int width,
int height,
double frameRate)
Create a new
CameraFormat with specified image size and frame rate. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(CameraFormat o) |
double |
getFrameRate()
Get the frame rate.
|
int |
getHeight()
Get the image height.
|
int |
getWidth()
Get the image width.
|
boolean |
isValid()
Checks whether this format is valid.
|
void |
setFrameRate(double frameRate)
Set new frame rate.
|
void |
setHeight(int height)
Set new image height.
|
void |
setWidth(int width)
Set new image width.
|
String |
toString() |
public CameraFormat()
CameraFormat with image size and frame rate equal zero.public CameraFormat(int width,
int height,
double frameRate)
CameraFormat with specified image size and frame rate.width - image width.height - image height.frameRate - capturing frame rate.public int getHeight()
public void setHeight(int height)
height - new image height.public int getWidth()
public void setWidth(int width)
width - new image width.public double getFrameRate()
public void setFrameRate(double frameRate)
frameRate - new frame rate.public boolean isValid()
CameraFormat is valid only if
the image width and height and frame rate are greater zero.public int compareTo(CameraFormat o)
compareTo in interface Comparable<CameraFormat>Copyright © 2013. All Rights Reserved.