0

I encountered a strange behavior which I can't seem to be able to figure out.

I am trying to write my own metadata with the image using the following:

[assetslibrary writeImageToSavedPhotosAlbum:imageA metadata:metadataAsMutable completionBlock:^(NSURL* assetURL1, NSError* error)...

If metadataAsMutable contains the following:

"{GPS}" =     {
    ImgDirection = "318.012299";
    Latitude = "1.373863";
    Longitude = "103.868583";
};

Rightfully, I would assume that metadata was written correctly.

However, when I do NSLog after the image was saved, I noticed that the information was reflected differently from what I had previously defined.

"{GPS}" =     {
    ImgDirection = "318.0123";
    Latitude = "1.373833333333333";
    Longitude = "103.8685";
};

Does anyone know what causes this behavior? I tried using NSNumberFormatter but it does not seem to help. I am trying to achieve 6 decimal places for the precision.

Any advice/help is deeply appreciated.

Belvia
  • 99
  • 1
  • 2
  • 12

0 Answers0