diff --git a/framework/src/com/phonegap/CameraLauncher.java b/framework/src/com/phonegap/CameraLauncher.java index 9dd5d0c1..dd619a24 100755 --- a/framework/src/com/phonegap/CameraLauncher.java +++ b/framework/src/com/phonegap/CameraLauncher.java @@ -180,8 +180,10 @@ public class CameraLauncher extends Plugin { File photo = null; if (encodingType == JPEG) { photo = new File(DirectoryManager.getTempDirectoryPath(ctx), "Pic.jpg"); - } else { + } else if (encodingType == PNG) { photo = new File(DirectoryManager.getTempDirectoryPath(ctx), "Pic.png"); + } else { + throw new IllegalArgumentException("Invalid Encoding Type: " + encodingType); } return photo; }