cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trubit <...@git.apache.org>
Subject [GitHub] cordova-plugin-camera pull request: Retaining image ratio when res...
Date Mon, 31 Aug 2015 21:29:24 GMT
Github user trubit commented on the pull request:

    https://github.com/apache/cordova-plugin-camera/pull/118#issuecomment-136507080
  
    Yeah, in my case it worked, but correct calculation is:
        var scale = Math.min(targetWidth / this.width, targetHeight / this.height);
    
    Calculates ratio for both sides and pick the small one


---
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


Mime
View raw message