|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.snapshot.SnapshotUtil
public class SnapshotUtil
| Constructor Summary | |
|---|---|
SnapshotUtil()
|
|
| Method Summary | |
|---|---|
static int |
getCameraMountPosition()
Retrieves the position of the camera. |
static CameraResolution |
getDefaultResolution()
Retrieves the default resolution. |
static String |
getProtocol()
Returns the protocol to capture an image |
static String[] |
getSnapshotEncodings()
Retrieves the supported snapshot encodings available on the current device. |
static String[] |
getSnapshotEncodingsWithResolutionCloseTo(int width,
int height)
Determines the best fitting encoding for reaching snapshots of at least the specified dimensions |
static String[] |
getSnapshotEncodingsWithResolutionCloseTo(int width,
int height,
boolean needsToBeLarger,
boolean needsToBeSmaller,
String format)
Determines the best fitting encoding |
static String[] |
getSnapshotFormats()
Tries to determine the available formats from the supported encodings |
static CameraResolution[] |
getSnapshotResolutions()
Tries to determine the available resolutions from the supported encodings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SnapshotUtil()
| Method Detail |
|---|
public static String getProtocol()
throws MediaException
MediaException - if capture is not supportedpublic static int getCameraMountPosition()
MOUNT_POSITION_LANDSCAPE,
MOUNT_POSITION_PORTRAIT,
MOUNT_POSITION_UNKNOWNpublic static String[] getSnapshotEncodings()
public static CameraResolution[] getSnapshotResolutions()
public static CameraResolution getDefaultResolution()
public static String[] getSnapshotEncodingsWithResolutionCloseTo(int width,
int height)
width - the minimum width, e.g. 800height - the minum height, e.g. 640
public static String[] getSnapshotEncodingsWithResolutionCloseTo(int width,
int height,
boolean needsToBeLarger,
boolean needsToBeSmaller,
String format)
format - the format, e.g. jpgwidth - the desired width, e.g. 800height - the desired height, e.g. 640needsToBeLarger - true when the found encodings needs to be the same size or larger than the specified dimensionsneedsToBeSmaller - true when the found encodings needs to be the same size or smaller than the specified dimensions
public static String[] getSnapshotFormats()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||