I’m using CameraCaptureTask chooser and always is returning a smaller photo that the original. Camera has a resolution of 2592×1944, but the returned photo is always 1296×972. I’m using a LG E-900.
Any ideas ?
I’m using CameraCaptureTask chooser and always is returning a smaller photo that the original.
Share
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 2000×2000 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.ChosenPhotofrom 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.