Monday 23 January 2006

Camera modes for Symbian60 camera phones

I've been messing about with the Python SDKs for Symbian60 phones. If you want to write anything using the camera, it helps to know what modes are available on your phone. So, here's a short Python script to do that and print the relevant information to the interpreter window:




"""
Prints all available information about available cameras:

* Number of cameras
* Maximum zoom
* Available image modes
* Available white balance modes
* Available image sizes
* Available flash modes
* Available exposure modes
"""

from camera import *

__author__ = 'Sarah Mount '

print 'This phone has', cameras_available(), 'camera(s).'
print 'Max zoom is', max_zoom(), '.'

for mode in image_modes():
print 'img_mode:', mode
for mode in white_balance_modes():
print 'wb_mode:', mode
for size in image_sizes():
print 'img_size:', size
for mode in flash_modes():
print 'flash_mode:', mode
for mode in exposure_modes():
print 'exp_mode:', mode

No comments:

Post a Comment