public class PreviewConfig extends CameraControlOptions
Modifier and Type | Field and Description |
---|---|
static int |
MAX_OPACITY
Maximum opacity (fully opaque).
|
static int |
MIN_OPACITY
Minimum opacity (invisible).
|
DEFAULT_BRIGHTNESS, DEFAULT_CONTRAST, DEFAULT_EV_COMPENSATION, DEFAULT_SATURATION, DEFAULT_SHARPNESS, MAX_BRIGHTNESS, MAX_CONTRAST, MAX_EV_COMPENSATION, MAX_ISO, MAX_SATURATION, MAX_SHARPNESS, MIN_BRIGHTNESS, MIN_CONTRAST, MIN_EV_COMPENSATION, MIN_ISO, MIN_SATURATION, MIN_SHARPNESS
Constructor and Description |
---|
PreviewConfig() |
Modifier and Type | Method and Description |
---|---|
void |
disablePreview()
Disables the preview window completely.
|
void |
enablePreview(int x,
int y,
int w,
int h)
Enable the preview window and define the size and location on the screen that the preview
window will be placed.
|
void |
enablePreviewFullscreen()
Enable fullscreen preview mode.
|
java.lang.String |
getPreviewSettings()
Get the preview settings part to use with the complete command line.
|
void |
setOpacity(int opacity)
Sets the opacity of the preview windows.
|
annotate, getOptions, setAWBMode, setBrightness, setCameraMode, setContrast, setEVCompensation, setExposureMode, setHorizontalFlip, setImageEffect, setISO, setRotationDegree, setSaturation, setSharpness, setVerticalFlip
public static final int MAX_OPACITY
public static final int MIN_OPACITY
public void enablePreview(int x, int y, int w, int h)
Note this will be superimposed over the top of any other windows/graphics.
x
- the x position of the window on the screen, in pixels.y
- the y position of the window on the screen, in pixels.w
- the width of the window, in pixels.h
- the height of the window, in pixels.public void enablePreviewFullscreen()
Note that the aspect ratio of the incoming image will be retained, so there may be bars on some edges.
public void disablePreview()
Note that even though the preview is disabled, the camera will still be producing frames, so will be using power.
public void setOpacity(int opacity)
0 = invisible, 255 = fully opaque. -1 if disabled.
opacity
- the new opacity to apply for future previews.public java.lang.String getPreviewSettings()