I am starting an android camera app for taking pictures. When I ctrl-shift-O to get the i开发者_如何学JAVAmport for the Camera class there are two choices: android.graphics.camera and android.hardware.camera. Which one should I use and what are the main differences?
android.graphics.camera
appears to only have functions for manipulating images for 3D transformations whereas android.hardware.camera
is much fuller and has actual support for camera functions.
You definitely want to use android.hardware.camera
. Full details on usage are here.
Not too sure about android.graphics.camera, but andrioid.hardware.camera is what you are looking for.
"The Camera class is used to set image capture settings, start/stop preview, snap pictures, and retrieve frames for encoding for video. This class is a client for the Camera service, which manages the actual camera hardware."
Upon further research...
"The Camera class in the android.graphic package is very different, it is used to calculate 3d transformations that can then be applied to animations"
graphics.Camera is only a "virtual camera" in 3D scenes. Its position deterimines what the scene will look like from att certain angle.
精彩评论