0

I'd like to be able to set a lock screen image that did not scale to take up the entire lock screen. This is causing a lot of issues with cutting off parts of the image either horizontally or vertically. If I have a WriteableBitmap version of my image, and either the height or width (whichever is larger) is scaled to be either the screen height or width, then how might I over lay that image on top of another image that is the page size to make the image become a 'full screen' image. I am thinking that this would mimic a 'screenshot', and therefore the lock screen would not try to scale the image (Even though there would be some blank background on part of the newly created image where the original did not show up).

As an example, if I'm trying to adapt a picture from PhotoChooserTask to overlay on a default image of 768x1280, where the 768x1280 will always remain in portrait orientation exactly as the lock screen does, regardless of the PhotoChooserTask image result's dimensions, how can I always make this fit inside the 768x1280?

Matthew
  • 3,976
  • 15
  • 66
  • 130
  • If the image is too small and is always stretched, why not make a larger bitmap, fill with black, and then center the smaller image within the bitmap? – WiredPrairie Jan 31 '14 at 12:09
  • Thanks, yes thats what i was thinking as well, but I guess the process to do this is where i have a question. Really just in the particulars of ensuring that the max width/height of the original image never goes outside of the larger bitmap, and stays with the correct aspect ratio. Do you know of any good tutorials or examples? – Matthew Jan 31 '14 at 13:06
  • While [this](http://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio) is in javascript, the logic will be the same (for how to keep the aspect ratio correct). – WiredPrairie Jan 31 '14 at 13:18

0 Answers0