Details

    • Type: New Feature
    • Status: Closed
    • Priority: Low
    • Resolution: Won't Do
    • Affects Version/s: Release 1.7.0
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:

      Description

      Let users apply a transform to the camera preview AFTER it has been shown (i.e. expose [picker setCameraViewTransform:[transform matrix]]). This will open up some interesting use cases.

      Sample Code

      Tested on an iPad 2, the following could be dropped in MediaModule.m:

      -(void)applyTransform:(id)args
      {
          ENSURE_UI_THREAD(applyTransform, args);
          ENSURE_SINGLE_ARG_OR_NIL(args, NSDictionary);
          if (args!=nil)
          {
              // allow a transform on the preview image
              id transform = [args objectForKey:@"transform"];
              if (transform != nil)
              {
                  [picker setCameraViewTransform:[transform matrix]];
              }
              else
              {
                  // revert to use our own fullscreen transform if the developer didn't supply one
                  picker.cameraViewTransform = CGAffineTransformScale(picker.cameraViewTransform, CAMERA_TRANSFORM_X, CAMERA_TRANSFORM_Y);
              }
          }
      }
      

      And it could be consumed by this trivial app.js:

      Ti.UI.createWindow({ backgroundColor: '#fff' }).open();
      Ti.Media.showCamera();
      Ti.Media.applyTransform({ transform: Ti.UI.create2DMatrix().scale(5) });</code>
      

      Associated Helpdesk Ticket

      http://support.appcelerator.com/tickets/UYQ-99734-671

        Attachments

          Activity

            People

            • Assignee:
              ingo Ingo Muschenetz
              Reporter:
              dtoth Dawson Toth
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration