4

I'm using CameraCaptureTask chooser and always is returning a smaller photo that the original. Camera has a resolution of 2592x1944, but the returned photo is always 1296x972. I'm using a LG E-900. Any ideas ?

Taryn East
  • 26,180
  • 8
  • 82
  • 101
Alex Troto
  • 571
  • 5
  • 16

2 Answers2

2

Sorry - but there's currently no way to do this - see Is it possible to configure the resolution of `CameraCaptureTask` in WP7?

if you are lucky, then the new Mango SDK might help - it's now 2 weeks away.

Community
  • 1
  • 1
Stuart
  • 65,726
  • 7
  • 109
  • 161
  • You are correct that an application is not able to specify what resolution they want to use to take the picture, but the question asks why the image returned is smaller than the capture resolution selected by the user. I believe this issue is due to BitmapImages automatically re-sizing pictures to be less than 2000x2000 (see my answer) – Greg Bray May 13 '11 at 04:55
2

Any JPG or PNG image file that is loaded into a BitmapImage object on Windows Phone will automatically be re-sized to be less than 2000x2000 to reduce the internal memory used to display the image to the screen. If you must access the image at a higher resolution you will need access to the original byte stream (e.ChosenPhoto from the completed event for example) and then load that into a System.Windows.Media.Imaging.WriteableBitmap object.

The issue then becomes that you may need to know the original size of the image, as the WriteableBitmap takes a size and width as part of it's constructor and will automatically re-size the image that you try and load into it. I believe the only way to load a high resolution image at it's original size is to use ExifLib on the byte stream to detect the original height and width, then create a WriteableBitmap at that size and use the System.Windows.Media.Imaging - Extensions.LoadJpeg method to load the image into the object. For more image loading samples see this question regarding re-sizing an image on Windows Phone.

Community
  • 1
  • 1
Greg Bray
  • 13,166
  • 10
  • 76
  • 99