Saving Large Photographs on WM6 CF2.0
Posted on 2007-11-27
I have a small application that runs on a HTC Touch device. Basically it takes a picture and saves it to a sql server database via a webservice.
The device is running Windows Mobile 6 and the app i developed is running on compact framework 2.0.
The application works fine when using the Small,Medium or Large quality setting on the camera, however if I use the 1megapixel or 2megapixel setting I get a OutOfMemoryException after the picture is taken when i try load the freshly taken picture into a bitmap object.
Here is the memory spec for this device:
Any ideas how i can overcome this problem and save a 2mp picture? It is a requirement of the project that
the picture resolution is 2mp.
here is the code im using:
Dim fileName As String = String.Empty
Dim ccd As New CameraCaptureDialog
ccd.Mode = CameraCaptureMode.Still
ccd.StillQuality = CameraCaptureStillQuality.High
fileName = ccd.FileName
PictureBox1.Image = New Bitmap(fileName)'the exception occurs here