7 Replies Latest reply on Sep 11, 2015 10:56 AM by schamblee

    Is there a method for rotating just-taken photos in FMGo 14?


      I frequently encounter a photo orientation problem when taking photos from within FileMaker Go 14 to be put in a container field. For some reason if the iPhone is the somewhat shooting downward the orientation is recorded as Portrait when my intention is Landscape. Or even "upside-down" if I'm shooting almost vertically. I end up having to take and retake the photo until I've tilted it just right so it doesn't report the wrong orientation.


      As a work around I've tried moving the photo to the iPhone Photos photo library, and using the simple edit tool there (rotate tool) to change the orientation to what I need, but then on fetching it from Photos into FMGo, the orientation is still displayed wrong - it seems FMGo is not honoring the rotation info provided by the edit.


      Interestingly, FMPro (14) also displays a photo rotate-edited in this manner the same as in FMGo, that is, not corrected --- but when output by FileMaker Server 14 using XML, the photo IS displayed correctly.


      Am I missing tools in FMGo for correcting orientation? This seems pretty basic.



        • 1. Re: Is there a method for rotating just-taken photos in FMGo 14?
          Devon Braun

          File this one under "Everything inevitably more complicated than you think"  You're likely dealing with two related but separate issues.  Image rotation and the Orientation EXIF meta tag.  The tag is just an indicator which software is free to recognize or ignore.  FMP container tags ignore them.  Apple Preview & iPhoto respect the.  Maybe someone made a list.


          What you want is software that gives you control over the Orientation tag.  Graphic Converter used allow you to delete the thing, and I suspect still does.  I use ExifTool. A command like: exiftool -EXIF:Orientation=1 'path/to/file' will set the orientation to not rotate.  You can use a different command to just get rid of it.  Once the image is free of the tag it's likely to suddenly show up sideways or upside down at the Finder level, at which point you use a software to rotate the actual image, not re-edit the tag.  (e.g. Apple Preview or Photoshop).


          Note: the benefit of using the Orientation meta tag method is that it allows you to make orientation changes without re-saving and hence slightly degrading your image, particularly for lossy formats like jpeg.  The downside is Tower of Babel like confusion between various image display environments.  My basic strategy: 1) Always archive the original image, 2) Delete the orientation tag and pixel rotate a copy, 3) have a good media management system in place because this gets messy quick.


          P.S. It gets weirder: I ended up with a batch of iPhone photos that contained TWO Orientation tags, both under EXIF DataGroup. Why?  No idea.  Maybe someone out there knows.

          • 2. Re: Is there a method for rotating just-taken photos in FMGo 14?

            databoom, I appreciate the reply.


            I have corrected some using Preview, rotating, then Save As, and reinserting into FileMaker Pro, but what I really want is to not have to revisit any of the photos for correction. I'm looking for a solution that handles it at the time the photo is taken, either within the camera phase of the Insert from Device script step (in FMGo) or after it is in the container field, but in any case on the iOS device (in FMGo) right away, not later. It's impractal to review hundreds of photos later to correct some every day. The photos need to be "done" when they are taken.


            I take it from your reply that you don't know of a way of accomplishing it in iOS, in FMGo. (Not a criticism of your reply, but of the situation.)


            Your comment about a rotation EXIF makes me think that maybe the reason it IS honored in a web browser viewing the container data via CWP, via XML from FileMaker Server is simply because the web browser pays attention to the EXIF rotation data, and Server does supply it.


            Do you know of any likelihood that FMI, in FMP/FMGo, might resolve this? If I recall correctly, in FMGo 13 only landscape photos could be taken, if you did a portrait photo it would be displayed sideways and distorted. Or maybe that was the fault of Server 12. In any case, I had been expecting to have no photo issues with FMP/FMGo/FMS 14 ... it's one of the big reasons I upgraded...



            • 3. Re: Is there a method for rotating just-taken photos in FMGo 14?
              Devon Braun

              If you're trying to resolve it in the moment in iPhone, you might run a series of tests either with an App that allows you to edit the Exif tag or simply rotate the photo using the native Photos app.  iPhone camera app will tag the photo's orientation regardless of the Orientation lock, so it doesn't seem like there's a solution there, but there is a little monitor window that helpfully indicates when the phone's sensors decide you've changed the angle of your phone.  By staying aware of that, you can ensure that all your photos are being taken with the orientation of your choosing to begin with.


              On the FMI side -- assuming a workflow where you capture the image in FMGo, then save it in FMI -- you'd want to develop a script that integrates with something like ExifTool or ImageMagick to automatically take note of, then strip the orientation tag and finally rotate actual photo for universal consistency.

              • 4. Re: Is there a method for rotating just-taken photos in FMGo 14?

                Thanks, databoom.


                I have experimented in the native Photos app, as I mentioned in the original post. That's how I was able to (apparently) change the orientation EXIF.


                The shooting monitor window is remarkably poor, as is the post-shoot preview (use/retake). I don't know if you've tried this in FMGo but it's hard to believe it couldn't be done better. I'll see if I can do a video to exhibit the rough edges. Neither one clearly gives clues about the orientation you'll get, or at least what they suggest is ambiguous.


                What I'd really like to see, at a minimum, is FMI fixing Go so the the use/retake preview is in the orientation that you are currently holding the device including the Use and Retake buttons (which are sideways if you are working in Landscape) and additionally have a rotate icon so that you can get the orientation you want before you tap "Use" which saves it in the container field. I know this falls between fixing a poor interface and a new feature request. Maybe I'll put it in as a Feature Request.


                Anyway thank you for suggesting a doable solution.

                • 5. Re: Is there a method for rotating just-taken photos in FMGo 14?

                  There is nothing build into to FM or FMGo to rotate images.  There was a bug in FMGO12 with some  images being inserted wrong as you state in your post.  That bugs was fixed.   I have not heard of another similar bug in FMGo14.   The best place to report possible bugs is with Report An Issue. Report an Issue  

                  • 6. Re: Is there a method for rotating just-taken photos in FMGo 14?
                    Devon Braun

                    The shooting monitor I was referring to was based on the iPhone Camera App as opposed to FMG, and indeed it's a tiny thumbnail, barely legible.  Its value is not in the clarity of the image but in the fact of its rotation.  More telling are the little icons for flash control, HDR, photo timer, and the front/back camera toggle.  They too will rotate depending on the phone's orientation sensors to give you definitive feedback.  This matters most when you're holding the phone face down or up or a sensor is for some reason sticky.  FMG's camera screen has a couple of those same icons, along with the resolution controller, so that whether you're using Camera App or FMG you can be 100% certain of your orientation.  The iPhone position considered "Normal" for photos is phone held horizontally, home button to the right.  Here's breakout that you might find helpful:


                    • Phone Horizontal, home button to the right: Exif Orientation = 1 "Horizontal (Normal)"
                    • Phone Horizontal, home button to the left: Exif Orientation = 3 "Rotate 180"
                    • Phone Vertical, home button bottom: Exif Orientation = 6 "Rotate 90"
                    • Phone Vertical, home button top: Exif Orientation = 8 "Rotate 270"


                    You mentioned you did some experimentation on the native apps and succeeded at "changing" the EXIF orientation, but my impression is that precise description is beyond iOS.  Here's why: When you take a picture on iPhone 6, it records the image as it's captured by the photo sensor and sets the orientation tag based on the phone orientation sensors.  Photos are displayed right side up not by rotating pixels but by reading the Exif orientation tag.  If you subsequently rotate, i.e. edit, a stored picture using the native "Photos" app, it's the image that is rotated, not the tag that's edited.  The tag remains unchanged.  In other words, iPhone's most obvious path to clearing up orientation confusion is actually surefire path of confounding it.


                    It's a compelling feature request, but they would have to address how the orientation tag and actual image rotation create technical bedlam.


                    What's your workflow precisely?  I would imagine the best would be either

                         a) Make sure you capture all your photos so the orientation tag = 1, or

                         b) Pass your photos from FMG to FMS, and then run a Server side or auxiliary FMP client to remove the tag and pixel rotate the image so that it displays right-side-up consistently for all devices.

                    • 7. Re: Is there a method for rotating just-taken photos in FMGo 14?

                      You might could use a java script in a webviewer to handle the file rotation. 


                      Tim Dietrich has some open-source projects. which you may want to take a look to see what is possible, and to give you some ideas how to come up with a solution for your needs.


                      FMEasyCanvas | An Open Source Drawing Solution for the FileMaker Platform