context: we get image data from an API. we want to save this image data as a JPEG file.
I tried using the built-in Easymorph function "decode" with parameter 'base64', but this produced files that windows couldn't display as jpegs.
I've managed to get this working without the in-between step of saving it to a delimited text file.
I have isolated the functionality in a seperate module that takes two parameters:
image_data containing the base64-encoded image
image_filename: the filename where I want to save it to. Be careful here: because we're using powershell you have to provide a full path to the destination location, you can't just start relatively from the easymorph project location.
the only action needed is calling this powershell script:
After getting a ton of images from the API, running this module recursively over the set produced a file for every result. Windows had no problem displaying the JPEG files.