# Class PhotoCaptureOptions

java.lang.Object
com.codename1.camera.PhotoCaptureOptions

public final class PhotoCaptureOptions extends java.lang.Object
Per-capture options for `CameraSession#takePhoto(PhotoCaptureOptions)`. A builder; chain calls fluently.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PhotoCaptureOptions()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PhotoCaptureOptions`
  `filePath(String path)`
  Override the destination file path (FileSystemStorage path).
  `String`
  `getFilePath()`
  Configured destination FileSystemStorage path, or `null` if the framework should pick a temp path.
  `int`
  `getHeight()`
  Requested capture height, or `0` to use the camera default.
  `int`
  `getJpegQuality()`
  JPEG encoding quality 1-100.
  `int`
  `getWidth()`
  Requested capture width, or `0` to use the camera default.
  `PhotoCaptureOptions`
  `jpegQuality(int q)`
  JPEG encoding quality 1-100.
  `PhotoCaptureOptions`
  `size(int width, int height)`
  Requested photo dimensions.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PhotoCaptureOptions

    public PhotoCaptureOptions()

- ## Method Details

  - ### size

    public PhotoCaptureOptions size(int width, int height)
    Requested photo dimensions. `0` (the default for either) means use the camera's default photo size.

  - ### jpegQuality

    public PhotoCaptureOptions jpegQuality(int q)
    JPEG encoding quality 1-100. Default 90.

  - ### filePath

    public PhotoCaptureOptions filePath(String path)
    Override the destination file path (FileSystemStorage path). When unset, the framework saves to a temp file under the app home.

  - ### getWidth

    public int getWidth()
    Requested capture width, or `0` to use the camera default.

  - ### getHeight

    public int getHeight()
    Requested capture height, or `0` to use the camera default.

  - ### getJpegQuality

    public int getJpegQuality()
    JPEG encoding quality 1-100.

  - ### getFilePath

    public String getFilePath()
    Configured destination FileSystemStorage path, or `null` if the framework should pick a temp path.