Hi - First post to ask a question.......I have tried to use attribute exposer to extract metadata from a jpg image, however, it does not appear to extract all the metadata that I am aware exists for the file. Example is shown of some of the metadata that exists for the file, namely relative altitude and pitch, roll and yaw. Can someone advise as to how I might extract these data (and others not shown via attribute exposer)?
ThanksHi @knotboy, do you mean that beside the standard format attributes that can be exposed in the reader ?(https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/jpeg/Feature_Representation.htm
there are more metadata attributes?
Â
Â
Hi if these attributes are not available as format or user attributes, then I would suggest trying to use a third party tool (via the system caller) to possibly make these specific attributes available in your workspace.
Hi if these attributes are not available as format or user attributes, then I would suggest trying to use a third party tool (via the system caller) to possibly make these specific attributes available in your workspace.
Â
Directory and File Pathnames and SystemCaller with IrfanView results in nice data:Â
"D:\apps\IrfanView\i_view32.exe @Value(path_windows) /info=@Value(path_directory_windows)\@Value(path_rootname).txt /fullinfo"
Â
Directory and File Pathnames and SystemCaller with IrfanView results in nice data:Â
"D:\apps\IrfanView\i_view32.exe @Value(path_windows) /info=@Value(path_directory_windows)\@Value(path_rootname).txt /fullinfo"
Â
Â
You can also use the PythonCaller with the exifread module (must be installed manually):
import exifread
import fmeobjects
class FeatureProcessor(object):
    def input(self,feature):
        filename = feature.getAttribute('image_filename')
        if filename:
            with open(filename, 'rb') as f:
                tags = exifread.process_file(f, details=False)
                for tag in tags.keys():
                    feature.setAttribute(tag, str(tagsÂtag]))
        self.pyoutput(feature)
The above code will read the jpeg or tiff file specified in the input attribute "image_filename" and add any metadata tags as feature attributes, e.g.:
`Image Make' has value `GoPro'
`Image Model' has value `HERO3+ Black Edition'
`Image Orientation' has value `Horizontal (normal)'
Â
Directory and File Pathnames and SystemCaller with IrfanView results in nice data:Â
"D:\apps\IrfanView\i_view32.exe @Value(path_windows) /info=@Value(path_directory_windows)\@Value(path_rootname).txt /fullinfo"
Â
Â
Tried it myself and the result is this Template.Â
exifmetadata.fmwt