On my Lumia 920 GetAvailablePreviewResolutions()
returns that the following 4 resolutions are available for the target device:
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
Ref: http://msdn.microsoft.com/en-us/library/windowsphone/develop/windows.phone.media.capture.photocapturedevice.setpreviewresolutionasync(v=vs.105).aspx
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
Ref: http://msdn.microsoft.com/en-us/library/windowsphone/develop/windows.phone.media.capture.photocapturedevice.setpreviewresolutionasync(v=vs.105).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With