dburnham

GetThumbnail fails when orientation is rotated

Discussion created by dburnham on Oct 11, 2018
Latest reply on Oct 12, 2018 by philmodjunk

I have a set of approx 250 photos that were taken using various iPhone models at outdoor residential locations.   Some of them are portrait, others are landscape.   The goal in the script is to take a medium resolution photo which is sent via email to a homeowner, then convert the image in FileMaker to a thumbnail size.

 

GetContainerAttribute reveals that the Orientation is 1 when it is a portrait photo where the camera/phone was not rotated.  Otherwise, the Orientation is a higher number, with a phrase indicating what kind of orientation was in effect when the photo was captured.   For example:  Orientation: 6 (Rotated 90 degrees counterclockwise)

 

GetThumbnail works perfectly to reduce the file size of the pictures that have the Orientation value of 1.  However, with any other orientation value, the GetThumbnail function returns the value "?" and the photo is not resized.

 

There doesn't seem to be a way in FileMaker to change the orientation of a photo that is already in a container field.  Plugins are not acceptable because this is FM-GO.

 

Perhaps I am guessing that the orientation is the thing that causes GetThumbnail to fail, but I don't see anything else that's different.  When the same person's phone takes a portrait orientation photo, GetThumbnail works fine.

Outcomes