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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Override the destination file path (FileSystemStorage path).
    Configured destination FileSystemStorage path, or null if the framework should pick a temp path.
    int
    Requested capture height, or 0 to use the camera default.
    int
    JPEG encoding quality 1-100.
    int
    Requested capture width, or 0 to use the camera default.
    jpegQuality(int q)
    JPEG encoding quality 1-100.
    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.