# Archived:How to take a photo in m programming language on Symbian

M on Symbian is not maintained and may not run on current Symbian versions. All M articles have been archived.

Tested with
Devices(s): Nokia N95, Nokia E90
Compatibility
Platform(s): S60 2nd Edition, S60 3rd Edition, S60 5th Edition
Symbian
S60 5th Edition
Platform Security
Capabilities: )
Article
Created: bogdan.galiceanu (05 May 2009)
Last edited: hamishwillee (09 May 2013)

## Overview

This snippet shows how to take a photograph in m.

## Preconditions

Note: The take function of the cam module requires Write permission if given a file path as an argument.

Images can be saved in JPEG, BMP, GIF or PNG format.

## Source code

`use cam, graph, ui  //Activate the camera with one of the supported resolutionscam.on(0) //Set the camera's brightness to slightly above normal and lower the contrastcam.bright(15)cam.contrast(-10) //Display the viewfindercam.view(0, 0, graph.full()[0], graph.full()[1]) //Set the menu and wait for the user to select the optionui.menu("Options", ["Take photo"], false)if ui.cmd() = "Take photo" then	//Take a picture and save it at highest quality	img = cam.take("C:\\picture.jpg", 100)end //Deactivate the cameracam.off()`

## Postconditions

A photograph will be taken with the given settings and stored at the given path.
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8236156702041626, "perplexity": 16543.448956592194}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-23/segments/1406510274289.5/warc/CC-MAIN-20140728011754-00383-ip-10-146-231-18.ec2.internal.warc.gz"}