Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello, i Try build application windows phone 7, but i have little problem in capture image with the camera.
private void button1_Click(object sender, RoutedEventArgs e)
       {
           CameraCaptureTask task = new CameraCaptureTask();
           task.Completed += (s, evt) =>
           {
               if (evt.Error == null && evt.TaskResult == TaskResult.OK)
               {
                   bmpImage.SetSource(evt.ChosenPhoto);
                   image1.Source = bmpImage;
               }
           };
           task.Show();
       }

this code above work 100% but I need to fix size 320*240 pixel image while capture.
any body know the properties to set it?
Posted
Comments
arbind kumar chaubey 26-May-12 3:08am    
how we can create database in local phone and then create table and save our record , and how to access records from local database

you can't control anything with the camera task..
you should open the camera in a canvas inside your app

here is a full solution :
http://www.codeguru.com/csharp/.net/wp7/article.php/c19919/Writing-a-Windows-Phone-75-Camera-Application.htm[^]
 
Share this answer
 
v2
Hi,

the WriteableBitmap-Class is an easy to use class to resize images.

http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap%28v=vs.95%29.aspx[^]

Hope it'll be useful for you.

With Best Regards
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900