cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dieppe <...@git.apache.org>
Subject [GitHub] cordova-plugin-camera pull request: [iOS] Major refactor
Date Wed, 02 Mar 2016 16:28:00 GMT
Github user dieppe commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-camera/pull/185#discussion_r54748635
  
    --- Diff: src/ios/CDVCamera.m ---
    @@ -402,6 +444,115 @@ - (NSString*)tempFilePath:(NSString*)extension
         return filePath;
     }
     
    +// This is not absolute, but more mightNeedOrientationCorrection
    +- (BOOL) needsOrientationCorrection:(UIImage*)image options:(CDVPictureOptions*)options
    +{
    +    // TODO use image to detect if it needs an orientation correction
    +
    +    // See FIXME #2
    +    //    if (options.sourceType != UIImagePickerControllerSourceTypeCamera) {
    +    //        return false;
    +    //    }
    +    return options.correctOrientation;
    +}
    +
    +- (BOOL) needsResize:(CDVPictureOptions*)options
    +{
    +    return (options.targetSize.height > 0 && options.targetSize.width >
0);
    +}
    +
    +- (BOOL) needsEdit:(UIImage*)image options:(CDVPictureOptions*)options
    +{
    +    return [self needsOrientationCorrection:image options:options] || [self needsResize:options];
    +}
    +
    +- (BOOL) needsSavingToPhotoAlbum:(UIImage*)image options:(CDVPictureOptions*)options
    +{
    --- End diff --
    
    It's trivial to change. Waiting for your confirmation to do so. In general, I am against
duplicating images on the user's phone. But if you think it makes sense to allow it, fine
by me :wink:.


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