Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-23716

Windows: Front camera preview/image is upside down

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 5.4.0
    • Fix Version/s: Release 6.0.0
    • Component/s: Windows
    • Labels:
      None
    • Story Points:
      5
    • Sprint:
      2016 Sprint 16 SDK

      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();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                kiguchi Kota Iguchi
                Reviewer:
                Gary Mathews
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-9973
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code