On my Lumia 920 GetAvailablePreviewResolutions()
returns that the following 4 resolutions are available for the target device:
- 1280x720
- 1024x768
- 800x448
- 640x480
but SetPreviewResolutionAsync()
accepts only 1024x768. For the other three (supported) resolutions it throws an exception
System.ArgumentException: Value does not fall within the expected range.
I have restarted my phone but it doesn't seem to help either.
==========================================================================
For future developers who face the same problem, below are my findings.
Nokia Lumia 920 supports the following 6 capture resolutions (with their corresponding aspect ratio):
3264X2448 4:3;
3552X2000 16:9;
2592X1936 4:3;
2592X1456 16:9 ;
2048X1536 4:3 ;
640X480 4:3 ;
and following 4 preview resolutions (with their corresponding aspect ratio):
1280X720 16:9;
1024X768 4:3 ;
800X448 16:9 ;
640X480 4:3;
for 16:9 aspect ratio capture_resolutions use only the 16:9 preview_resolutions.
Ref: http://www.developer.nokia.com/Resources/Library/Lumia/#!advanced-photo-capturing.html