[TIMOB-23716] Windows: Front camera preview/image is upside down
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-08-04T18:41:31.000+0000 |
Affected Version/s | Release 5.4.0 |
Fix Version/s | Release 6.0.0 |
Components | Windows |
Labels | n/a |
Reporter | Kota Iguchi |
Assignee | Kota Iguchi |
Created | 2016-08-03T09:09:36.000+0000 |
Updated | 2016-08-31T07:59:27.000+0000 |
Description
As of TIMOB-23687 we can take a shot from front camera, but its preview and saved image is upside down.
var win = Ti.UI.createWindow({ backgroundColor: 'green', layout: 'vertical' }),
openButton = Ti.UI.createButton({ title: 'OPEN CAMERA', backgroundColor: 'blue' }),
imageView = Ti.UI.createImageView({ width: Ti.UI.FILL, height: '70%' });
var overlay = Ti.UI.createView({
layout: 'vertical',
height: '20%', width: Ti.UI.FILL,
bottom: 0
}),
takeButton = Ti.UI.createButton({ title: 'TAKE A PHOTO', backgroundColor: 'red' }),
hideButton = Ti.UI.createButton({ title: 'HIDE PREVIEW', backgroundColor: 'red' });
takeButton.addEventListener('click', function () {
Ti.Media.takePicture();
});
hideButton.addEventListener('click', function () {
Ti.Media.hideCamera();
});
overlay.add(takeButton);
overlay.add(hideButton);
openButton.addEventListener('click', function () {
Ti.Media.showCamera({
whichCamera: Titanium.Media.CAMERA_FRONT, // Titanium.Media.CAMERA_REAR
mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],
overlay: overlay,
success: function (e) {
Ti.API.info('showCamera() success');
imageView.image = e.media;
},
error: function (e) {
alert('showCamera() error: ' + JSON.stringify(e));
}
});
});
win.add(openButton);
win.add(imageView);
win.open();
https://github.com/appcelerator/titanium_mobile_windows/pull/802
Verified using: Windows 10 Pro Appc core: 6.0.0-35 Appc NPM: 4.2.8-6 Ti SDK: 6.0.0.v20160829234637 Lumia 930 10.0 Front camera preview is now oriented correctly Closing ticket