c# - Selected image Orientation in canvas in WP8.1 SL -


i selecting image wp device using filepicker , want set image child of canvas. here bmp bitmapimage formed selected storage file.

_img.source = bmp; _img.stretch = stretch.uniform; (sender canvas).children.add(_img); 

what got this, should orientation of selected image can set inside canvas perfectly.

i tried setting below, before add child canvas.

stream stream = await storagefile.openstreamforreadasync(); bmp.decodepixelheight = 700; bmp.decodepixelwidth = 450; bmp.setsource(stream); 

storagefile selected file device.

this fine, if image portrait. need set decodepixelheight , decodepixelwidth according orientation.

i apologize if question dumb!! :)

try don't set decodepixelheight , decodepixelwidth. next set image stretch none.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -