Message Boards Message Boards

Image EXIF data lost going through DataBin

Hi Everyone,

When I import an image taken with my iPhone, and examine the metadata within Mathematica, it is comprehensive. When I use a FormPage in CloudDeploy to capture images (using

"Interpreter"->"Image"

in a FormObject) and then

CloudDeploy[FormPage[myForm,DatabinUpload[myBin,"image"->#image]

everything works great except... when I grab that image from the databin and look at the metadata, it had been heavily altered. Here is an example of 'full' metadata from a directly imported image:

{MetaInformation -> <|"Exif" -> <|"GPSLatitudeRef" -> "North", 
     "GPSLatitude" -> Quantity[40.7388, "AngularDegrees"], 
     "GPSLongitudeRef" -> "West", 
     "GPSLongitude" -> Quantity[74.1696, "AngularDegrees"], 
     "GPSAltitudeRef" -> "Above sea level", 
     "GPSAltitude" -> Quantity[0, "Meters"], "Make" -> "Apple", 
     "Model" -> "iPhone 4", 
     "Orientation" -> <|"CameraTopOrientation" -> Top, 
       "Mirrored" -> False|>, "XResolution" -> 72, 
     "YResolution" -> 72, "ResolutionUnit" -> "Inch", 
     "Software" -> "7.1.2", 
     "DateTime" -> DateObject[{2014, 8, 11, 13, 40, 43.}, "Instant"], 
     "YCbCrPositioning" -> "Centered", 
     "ExposureTime" -> Quantity[1/479, "Seconds"], 
     "FNumber" -> "f/2.8", "ExifTag" -> 204, 
     "ExposureProgram" -> "Program", "GPSTag" -> 1126, 
     "ISOSpeedRatings" -> 80, "ExifVersion" -> "2.21", 
     "DateTimeOriginal" -> 
      DateObject[{2014, 8, 11, 13, 40, 43.}, "Instant"], 
     "DateTimeDigitized" -> 
      DateObject[{2014, 8, 11, 13, 40, 43.}, "Instant"], 
     "ComponentsConfiguration" -> "YCbCr", 
     "ShutterSpeedValue" -> 
      Quantity[14272/1603, IndependentUnit["exposure values"]], 
     "ApertureValue" -> 
      Quantity[4281/1441, IndependentUnit["exposure values"]], 
     "BrightnessValue" -> 8157/1009, 
     "MeteringMode" -> "Multi-segment", 
     "FlashInfo" -> <|"FlashUsed" -> False, 
       "FlashFiringStatus" -> "No strobe return detection function", 
       "FlashMode" -> Automatic, "FlashFunctionPresent" -> True, 
       "RedEyeCorrection" -> False|>, 
     "FocalLength" -> Quantity[3.85, "Millimeters"], 
     "SubjectArea" -> Rectangle[{1891/2, 619}, {3289/2, 1315}], 
     "MakerNote" -> ByteArray[CompressedData["
1:eJxTTMoPSmJkYGAwABKOBQU5qQqZ/sEMDIy+vgxsDIwMnEApkDQDAxMDO5DM
AeIYBmYwOwOITzCwwNUwAnXA2JeAKhDiQJBUkJNZXGJg4C/goGNiZdD9ZPpW
J2ez4l//30Q6Ghqr2p74XG2mayLExeV6wNzYJ1iNm7PQytjGWoufV1hdnk9A
jJ9bwEyQg52bnZONA+weBkaIu2DuQwBvmF1XGJmYWVjZ2DlC03IS04tDyxJz
SlNDUwvykzMiSzJzU4uTE3NSBRiFGRhUuzPe7+AVYBCynnWKgUNQXFZZV9/C
Cs0eTjR77AFykzL2
"]], "SubSecTime" -> "000", 
     "SubSecTimeOriginal" -> "000", "SubSecTimeDigitized" -> "000", 
     "FlashpixVersion" -> "1.00", "ColorSpace" -> "RGBColor", 
     "PixelXDimension" -> 2592, "PixelYDimension" -> 1936, 
     "SensingMethod" -> "One-chip color area", 
     "SceneType" -> "Directly photographed", 
     "ExposureMode" -> Automatic, "WhiteBalance" -> Automatic, 
     "FocalLengthIn35mmFilm" -> Quantity[35, "Millimeters"], 
     "SceneCaptureType" -> "Standard", 
     "LensSpecification" -> {2018451/524273, 2018451/524273, 14/5, 14/
       5}, "LensMake" -> "Apple", 
     "LensModel" -> "iPhone 4 back camera 3.85mm f/2.8"|>|>}

Here is an example after an image has gone through the DataBin:

{MetaInformation -> <|"Exif" -> <|"ImageWidth" -> 3024, 
     "ImageLength" -> 4032, 
     "Orientation" -> <|"CameraTopOrientation" -> Top, 
       "Mirrored" -> False|>, "XResolution" -> 72, 
     "YResolution" -> 72, "ResolutionUnit" -> "Inch", 
     "Software" -> 
      "Created with the Wolfram Language : www.wolfram.com", 
     "DateTime" -> 
      DateObject[{2022, 3, 24, 14, 18, 11.}, "Instant", 
       "Gregorian", -4.], "ExifTag" -> 228, "TimeZoneOffset" -> -4, 
     "ColorSpace" -> "Uncalibrated", "PixelXDimension" -> 4032, 
     "PixelYDimension" -> 3024|>, 
   "Comments" -> <|"Software" -> 
      "Created with the Wolfram Language : www.wolfram.com", 
     "Creation Time" -> 
      DateObject[{2022, 3, 24, 14, 18, 11.}, "Instant"]|>|>}

And if I extra the metadata as part of the form action, putting it in it's own key in the DataBin, I only get this:

{MetaInformation -> <|"Exif" -> <|"Orientation" -> \
<|"CameraTopOrientation" -> Top, "Mirrored" -> False|>, 
     "ExifTag" -> 38, "ColorSpace" -> "Uncalibrated", 
     "PixelXDimension" -> 4032, "PixelYDimension" -> 3024|>|>}

Does anyone know why so much of the metadata is being lost? Is it an Apple thing, for security? Really what I want to capture are the GPS coordinates. It's for a research project.

Gareth

P.S. I can post the exact code I'm using, but for it to work for someone else I'll need to make a public databin, etc. Before I do that, I wondered if anyone just knows why this is happening.

POSTED BY: Gareth Russell
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract