1

I am getting photo like this :

-(void) imagePickerController:(UIImagePickerController *)pickers didFinishPickingMediaWithInfo:(NSDictionary *)info {
CGSize size = CGSizeMake(IMAGEW, IMAGEH);
if([pickers isEqual:picker]){
    UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
    NSLog(@"Image Info : %@",info);
    if (image != nil)
    {
        profileImg = [[NSData alloc] initWithData:UIImageJPEGRepresentation([[Utilities Instance] imageWithImage:image scaledToSize:size],0.5)];
    }
    [self.selectedPhotoImageView setImage:[[Utilities Instance] imageWithImage:image scaledToSize:size]];
}
[self dismissViewControllerAnimated:YES completion:nil];
}

profileImage variable is of type NSData* which i am uploading. But in server uploaded image doesn't have any geo tags.

NS LOG line generate these logs:

Image Info : {
UIImagePickerControllerMediaMetadata =     {
    DPIHeight = 72;
    DPIWidth = 72;
    Orientation = 6;
    "{Exif}" =         {
        ApertureValue = "2.526068811667587";
        BrightnessValue = "-0.0856067190783939";
        ColorSpace = 1;
        DateTimeDigitized = "2017:02:24 17:04:07";
        DateTimeOriginal = "2017:02:24 17:04:07";
        ExposureBiasValue = 0;
        ExposureMode = 0;
        ExposureProgram = 2;
        ExposureTime = "0.06666666666666667";
        FNumber = "2.4";
        Flash = 24;
        FocalLenIn35mmFilm = 33;
        FocalLength = "4.12";
        ISOSpeedRatings =             (
            400
        );
        LensMake = Apple;
        LensModel = "iPhone 5 back camera 4.12mm f/2.4";
        LensSpecification =             (
            "4.12",
            "4.12",
            "2.4",
            "2.4"
        );
        MeteringMode = 5;
        PixelXDimension = 3264;
        PixelYDimension = 2448;
        SceneType = 1;
        SensingMethod = 2;
        ShutterSpeedValue = "3.906905022631062";
        SubjectArea =             (
            1631,
            1223,
            1795,
            1077
        );
        SubsecTimeDigitized = 445;
        SubsecTimeOriginal = 445;
        WhiteBalance = 0;
    };
    "{MakerApple}" =         {
        1 = 4;
        20 = 1;
        3 =             {
            epoch = 0;
            flags = 1;
            timescale = 1000000000;
            value = 41804507377875;
        };
        4 = 1;
        5 = 153;
        6 = 164;
        7 = 1;
        8 =             (
            "0.43578040599823",
            "-0.9068009257316589",
            "-0.08205072581768036"
        );
    };
    "{TIFF}" =         {
        DateTime = "2017:02:24 17:04:07";
        Make = Apple;
        Model = "iPhone 5";
        ResolutionUnit = 2;
        Software = "10.2.1";
        XResolution = 72;
        YResolution = 72;
    };
};
UIImagePickerControllerMediaType = "public.image";
UIImagePickerControllerOriginalImage = "<UIImage: 0x6936190> size {2448, 3264} orientation 3 scale 1.000000";
}

I'm not selecting image I'm capturing it.

I am uploading image in different VC not in same VC.

I have given all rights of location to camera application of mobile.

This is my second question: If location is off for camera I want to detect it and show to show message.

Yawar
  • 1,924
  • 3
  • 29
  • 39

0 Answers0