This is a HowTo.
I had a hard time adding a raster to an HTMLReportGenerator. Thanks to some remarks in an old Question of the Week I found a solution. Many thanks to
I share my solution here for others that may encounter the same problem (and for myself, in case I encounter the problem once more in a few months 😉).
HTMLReportGenerator can't use a raster, but it can use an image. This image must be in binary encoding. The image can be embedded in the HTML, so it suffices to have a temporary image. The temporary image will be automaticaly removed when the workspace finishes.
So the process becomes:
- Use a TempPathnameCreator to provide a path for temporary storage of the image file
- Use a RasterExtractor to convert the raster to a blob
- Use an AttributeFileWriter to export the blob to a temporary file. Specify FME-binary Encoding
- In an HTMLReportGenerator embed the temporary file as an image
