Project: titanium
Issue TIMOB-6493: iOS: Titanium.Media.takeScreenshot fails to orient captured image to reflect hardware orientation
h4. Expected Behavior: Take an horizontal screenShot and attach it to an email and the image attached goes horizontal too, or save the screenshot on the Photo Gallery and save it horizontal too. h4. Actual Behavior: The image saves and attach to the email vertically, even if i create a matrix transformation and rotate this one, if i add to the window the image rotated looks good, but if i save to the photo gallery or attach it to an email, looks vertical again h4. Test Case: {code} var win = Ti.UI.createWindow({ backgroundColor:'#FFFFFF', orientationModes:[Ti.UI.PORTRAIT,Titanium.UI.LANDSCAPE_LEFT,Titanium.UI.LANDSCAPE_RIGHT] }); var button = Ti.UI.createButton({ title: 'ScreenShot!!' }) button.addEventListener('click',function(){ Titanium.Media.takeScreenshot(function(event){ var screenShot = event.media; var img = Titanium.UI.createImageView({ image: screenShot, borderColor: 'red', borderWidth: 10 }); Ti.API.info('taking screenshot'); img.addEventListener('click', function() { Ti.API.info('remove image'); win.remove(img); img = null; }); win.add(img); }); }); win.add(button); win.open(); {code}
Story points: 3