You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by muratsu <gi...@git.apache.org> on 2015/04/18 02:48:55 UTC

[GitHub] cordova-plugin-camera pull request: CB-8404 Rotate camera feed wit...

GitHub user muratsu opened a pull request:

    https://github.com/apache/cordova-plugin-camera/pull/88

    CB-8404 Rotate camera feed with device orientation

    Fixed 2 bugs in windows where we have trouble rotating the image on preview and saving

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-8404

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-camera/pull/88.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #88
    
----
commit 0ea0cf9b6b5c9499fb50548455df1b5fffbb47b7
Author: Murat Sutunc <su...@gmail.com>
Date:   2015-04-17T00:27:55Z

    CB-8404 Rotate camera feed with device orientation

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-camera pull request: CB-8404 Rotate camera feed wit...

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-camera/pull/88#discussion_r28708855
  
    --- Diff: src/windows/CameraProxy.js ---
    @@ -310,29 +319,50 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) {
     
             tempFolder.createFileAsync(fileName, generateUniqueCollisionOption)
                 .then(function(tempCapturedFile) {
    -                capturedFile = tempCapturedFile;
    -                return capture.capturePhotoToStorageFileAsync(encodingProperties, capturedFile);
    +                return new WinJS.Promise(function (complete) {
    +                    var imgStream = new Windows.Storage.Streams.InMemoryRandomAccessStream();
    --- End diff --
    
    Some comments on why the rotation needs to be done will be good - since its not quite obvious.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-camera pull request: CB-8404 Rotate camera feed wit...

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-camera/pull/88#discussion_r28708275
  
    --- Diff: src/windows/CameraProxy.js ---
    @@ -310,29 +319,50 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) {
     
             tempFolder.createFileAsync(fileName, generateUniqueCollisionOption)
                 .then(function(tempCapturedFile) {
    -                capturedFile = tempCapturedFile;
    -                return capture.capturePhotoToStorageFileAsync(encodingProperties, capturedFile);
    +                return new WinJS.Promise(function (complete) {
    +                    var imgStream = new Windows.Storage.Streams.InMemoryRandomAccessStream();
    --- End diff --
    
    imgStream.close() needs to be invoked once you are done using it to release system resources. It needs to be part of the success and error case.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-camera pull request: CB-8404 Rotate camera feed wit...

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on the pull request:

    https://github.com/apache/cordova-plugin-camera/pull/88#issuecomment-94514784
  
    It might be a good idea to file a JIRA to improve the code for resizeImage and not to use canvas for a resize operation.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-camera pull request: CB-8404 Rotate camera feed wit...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-plugin-camera/pull/88


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-camera pull request: CB-8404 Rotate camera feed wit...

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-camera/pull/88#discussion_r28708793
  
    --- Diff: src/windows/CameraProxy.js ---
    @@ -310,29 +319,50 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) {
     
             tempFolder.createFileAsync(fileName, generateUniqueCollisionOption)
                 .then(function(tempCapturedFile) {
    -                capturedFile = tempCapturedFile;
    -                return capture.capturePhotoToStorageFileAsync(encodingProperties, capturedFile);
    +                return new WinJS.Promise(function (complete) {
    +                    var imgStream = new Windows.Storage.Streams.InMemoryRandomAccessStream();
    --- End diff --
    
    Same needs to be done for `fileStream`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-camera pull request: CB-8404 Rotate camera feed wit...

Posted by muratsu <gi...@git.apache.org>.
Github user muratsu commented on the pull request:

    https://github.com/apache/cordova-plugin-camera/pull/88#issuecomment-94889877
  
    Rebased and squashed - ready to merge.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org