I’m making a Windows Phone 7 application which involves getting large images from the web and putting it in a ScrollViewer for the user to scroll through. I think I’m hitting a limitation of BitmapImage, though, as the image seems to get cut off at 2048 pixels in either height or width.
Is this a known limitation of Silverlight BitmapImage and is there some other class to use in this case to allow scrolling through the large images?
Thanks
Yes, there is a limit of 2k x 2k. This is limitation and a workaround are described in the white paper “Creating High Performing Silverlight Applications for Windows Phone” http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=3a8636bf-185f-449a-a0ce-83502b9ec0ec
XAML:
Code Behind:
The Resize method of the WriteableBitmapEx can also be used for this task if no JPEG stream is available.