NAUTIZ X5 - Camera Tweeks

Marcus Grenängen, 2010-06-14 11:46

The team ran into some problems using the C# CameraCaptureDialog class for taking pictures with the Compact Framework. When calling the ShowDialog() method it throws a OutOfMemoryException and the user is unable to capture a image.

To solve this problem, we tried to set the properties for Resolution and StillQuality for the CameraCaptureDialog but still no dice. It turns out that the OEM can force the settings written to the registry to override any properties applied for the CameraCaptureDialog class.

After digging in the registry we found the following keys that modifies the camera behavior.

HKEY_CURRENT_USER\Software\Microsoft\Pictures\Camera\USER\Resolution
and
HKEY_CURRENT_USER\Software\Microsoft\Pictures\Camera\USER\QualitySetting

By changing the Resolution value to 0 (480x640 resolution) and the QualitySetting value to 2 (Low quality) we are able to fulfill the requirements and get the CameraCaptureDialog to function properly.

Comments

Loading...