Skip to main content
Question

Data Streaming - JPG's with custom EXIF tags.

  • December 19, 2022
  • 1 reply
  • 80 views

vhruska
Contributor
Forum|alt.badge.img+6

Hello, I have an FME Server Workspace that uses a Python Caller to write custom EXIF tags to a JPG.

 

I want these images to be provided directly to the user via data streaming. The only way I have found to accomplish this so far is to pass the image path to a filecopy writer. This works OK - It will display the image, and if saved - it will retain the custom EXIF tags - however, when saving the image - it wants to save it as the .fmw workbench name (and .fmw as the filetype).

 

Does anyone have any suggestions to get around this? It seems that the mime-type isn't coming across using the data streaming.

 

FYI - I have tried a JPG writer at the end (feature reader - feature writer), but this cuts out the custom EXIF tags.

1 reply

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • January 17, 2023

Hi @vhruska​,

The Text File writer can be forced into writing a binary file with a bit of User Parameter coercion. Please try the following:

  • Use an AttributeFileReader to read the JPG file into an attribute named text_line_data
  • Send the feature to a Text File writer
  • In the Workspace Parameters, create a new unpublished text User Parameter named Encoding. Set its default to fme-binary
  • In the Text File writer parameters, link Character Encoding to the Encoding parameter. This will force the Text File writer to write a binary file rather than a text file.
  • Set the MIME type of the Text File writer to image/jpeg

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings