Class CapturedPhoto
java.lang.Object
com.codename1.camera.CapturedPhoto
Result of a still-photo capture via CameraSession#takePhoto().
Both an in-memory JPEG byte array and a file path are returned; the framework always saves to the app-private storage so that the bytes survive the callback scope.
-
Constructor Summary
ConstructorsConstructorDescriptionCapturedPhoto(byte[] jpegBytes, String filePath, int width, int height) Used by platform implementations. -
Method Summary
-
Constructor Details
-
CapturedPhoto
Used by platform implementations.
-
-
Method Details
-
getJpegBytes
public byte[] getJpegBytes()JPEG-encoded bytes of the captured photo. Hand directly to thecom.codename1.ai.*modules without re-reading from disk. -
getFilePath
FileSystemStorage path the JPEG was saved to. The file is in the application's private storage and persists until the app deletes it. -
getWidth
public int getWidth()Pixel width of the captured photo. -
getHeight
public int getHeight()Pixel height of the captured photo. -
toImage
Convenience: decode the JPEG bytes into a Codename OneImage.- Throws:
IOException
-