Categories: S60 | Python | How To | Code Examples | Multimedia | Imaging
This page was last modified 21:45, 13 February 2008.
How to take a photo
From Forum Nokia Wiki
For taking a photo you can use camera module. photo can have many parameters :
- use different sizes (640x480 and 160x120 in my case, sometimes 1024x768, 1600x1200 ...)
- available sizes may differ according to appuifw.app.orientation (like on N95)
- use zoom (0 or 1 in my case)
- take photos at 12, 16 or 24-bit color, in RGB or in JPEG ('RGB12', 'RGB16', 'RGB', 'JPEG_Exif')
- using flash ('none', 'auto', 'forced', 'fill_in', 'red_eye_reduce')
- set white-balance and exposure (I use 'auto' for both, but sometimes I may use 'night' exposure)
- returns an image object which can be saved in 'jpg' or 'png' format
- Caution here: RGB modes return an image, JPEG returns a file that is saved differently
# Fortunately default values can be used # below code has been copied from camera.py file # def take_photo( # mode='RGB16', # size=(640, 480), # zoom=0, # flash='none', # exposure='auto', # white_balance='auto'): #So the simplest example is import camera im = camera.take_photo() # use all default values im.save(u'C:\\test.jpg') # You can see what you can set on your phone from camera import * print image_modes() # By default, image_sizes() return image sizes for RGB16 mode. You may specify a mode print image_sizes() # JPEG will probably allow higher res, but will return a file content, not an image print image_sizes('JPEG_Exif') print max_zoom() print flash_modes() print exposure_modes() print white_balance_modes()
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to add item to single graphic listbox? | wzym | Symbian User Interface | 6 | 2003-10-08 09:50 |
| 3205 or 6225 | rm22 | General Discussion | 1 | 2006-02-03 01:25 |
| Display N70 | korg74 | General Browsing | 2 | 2006-01-09 10:38 |
| Converting to SVG-T | rihoe | Symbian User Interface | 8 | 2007-09-10 18:17 |
| Camera action!!!???? | zhengyu97 | General Symbian C++ | 4 | 2005-03-03 08:05 |
