Question

How to write byte[] in json to PNG image

  • 15 February 2018
  • 2 replies
  • 11 views

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


2 replies

Badge +1

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

Badge +4

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

Reply