Availability: S60.
The camera module enables taking photographs and video recording.
The following data items for state information are available in camera:
stop_recording
call).
The camera module has the following functions3.3:
) |
) |
['RGB12', 'RGB', 'JPEG_Exif', 'RGB16'].
) |
(x, y)
tuples, for example: [(640, 480), (160, 120)]
.
) |
) |
) |
) |
[mode, size, zoom, flash, exposure, white_balance, position]) |
Image
format (for more information on Image
format, see
Chapter 3.3 graphics Module) or
The settings listed below describe all settings that are supported by the
camera
module. You can retrieve the mode settings available for your
device by using the appropriate functions listed at the beginning of this
chapter.
'RGB16'
. The following display modes are supported for the Image
format pictures taken:
'RGB12'
: 4096 colors (12 bits per pixel)
'RGB16'
: 65536 colors (16 bits per pixel). Default value, always supported
'RGB'
: 16.7 million colors (24 bits per pixel)
For the JPEG data format images the following modes are supported:
'JPEG_Exif'
: JPEG Exchangeable image file format
'JPEG_JFIF'
: JPEG File Interchange Format
Note that there is variety between the devices and the supported formats.
(640, 480)
. The following sizes are supported, for example, in Nokia 6630: (1280, 960)
, (640, 480)
and (160, 120)
.
'none'
. The following flash mode settings are supported:
'none'
No flash. Default value, always supported
'auto'
Flash will automatically fire when required
'forced'
Flash will always fire
'fill_in'
Reduced flash for general lighting
'red_eye_reduce'
Red-eye reduction mode
0
, meaning that zoom is not used.
'auto'.
The following exposure modes are supported:
'auto'
'night'
'backlight'
'center'
'auto'
and the following white balance modes are supported:
'auto'
'daylight'
'cloudy
' 'tungsten'
'fluorescent
' 'flash'
1
, whereas the one pointing away from the user is located in position 0
. The default position is 0
.
If some other application is using the camera, this operation fails, with error
SymbianError: KErrInUse
. Invoking this function right after the device
boot, might result in SymbianError: KErrNotReady
error.
In some Nokia devices (e.g. in N95), to be able to get the highest possible size for the captured image, you need to:
appuifw.app.orientation
)
camera
module
'JPEG_Exif'
format.
callable[, backlight_on=1, size=main_pane_size]) |
Starts the camera viewfinder and binds a callback to receive Image
format
feed. When a new viewfinder frame is ready the callback is invoked with the
Image
as parameter.
The optional parameter backlight_on
determines whether the device
backlight is kept on when the camera view finder is in operation. By default,
the backlight is on (1 = on, 0 = off).
The optional parameter size
(of type tuple, e.g. (176, 144)
) can
be used to change the size of the Image
received in the callback. The
default size
is the same as the application's main pane size.
Example view finder code:
>>> import appuifw >>> import camera >>> def cb(im): ... appuifw.app.body.blit(im) ... >>> import graphics >>> appuifw.app.body=appuifw.Canvas() >>> camera.start_finder(cb) >>>
) |
) |
filename, callable) |
Prior calling this function, the view finder needs to be started.
) |