Crop and resize any image to create a lockscreen for your phone with the [RTM] Nokia Imaging SDK 27. January 2014 Shawn Windows Phone (0) Awhile back I blogged about this same topic but with the beta version of the Nokia Imaging SDK. When Nokia released the RTM of their Imaging SDK, this functionality changed. We’ll take a look at how to accomplish this same functionality with the new Imaging SDK.The good news we will be able to reuse the GetRandomImage method that picked a photo from the phones library. private Picture GetRandomImage() { var rand = new Random(DateTime.Now.Millisecond); MediaLibrary library = new MediaLibrary(); var album = library.RootPictureAlbum; int albumIndex = rand.Next(0, album.Albums.Count - 1); album = album.Albums[albumIndex]; var pictureIndex = rand.Next(0, album.Pictures.Count - 1); var picture = album.Pictures[pictureIndex]; return picture; } We will also be able to reuse the GetCropArea method without any change... [More]
Use the [beta] Nokia Imaging SDK to crop and resize any image to create a lockscreen for your phone 13. November 2013 Shawn Windows Phone (0) When the new Nokia Imaging SDK was released I was really excited to start using it within one of my apps. Unlike most, I was not interested in the image filters that change how it looks. I was initially interested in using the resize and crop functionality it had. The day after it was released my wife had surgery, so I had a good amount of time to play with the SDK while I sat in the waiting room. What I wanted to accomplish that was to take a random photo from the users phone, crop and resize it to fit the device and set it as the lockscreen. I know that you can set any image to be the lockscreen and if the image is too big, it will center the image. I needed to do it manually because I wanted to overlay information on the image. Getting the random image is pretty easy. We’ll just get one from the MediaLibrary. private Picture GetRandomImage() { var rand = new Random(DateTime.Now.Millisecond); MediaLibrary library = ne... [More]