Skip to main content
Question

How to write byte[] in json to PNG image

  • February 15, 2018
  • 2 replies
  • 190 views

A JSON file stored PNG images in byte[] text format. How do I convert them into PNG?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

lottegis
Forum|alt.badge.img+1
  • February 15, 2018

I'm guessing the byte data type is base64. If that's the case, try...

  1. BinaryDecoder: Encoding Type=Base64
  2. RasterExtractor: Format=PNG

I think this article is related, that you can go in reverse: https://knowledge.safe.com/articles/1176/embedding-images-in-html-with-fme.html


jochgem
Contributor
Forum|alt.badge.img+5
  • Contributor
  • July 11, 2018

A small correction: the RasterExtractor needs to be the RasterReplacer. The two steps explained are correct.