How to use the Windward Engine to directly access image data for charts (and other images) in HTML output. (The following does not apply only to charts in HTML -- it applies to any image output to HTML -- but it is probably most useful for charts.) This is very useful if you would like to handle your own image file storage.
When outputting charts to HTML, Windward produces the chart as an image. After running a report in either the Java or .NET engine, all of the image files are saved as bitmap streams which can be accessed directly from the respective API calls.
Note, in the Java Engine, this will return an OutputStream.
Storing Image Data in an HTML File
If you are instead interested in simply storing the image data in the HTML file, Windward has a feature called “embedded HTML images.” It is done with “Base64 encoding,” which converts the image data into data that can be stored as text. This works because HTML files are stored as text rather than binary, which restricts the domain of the data that can be stored in an HTML file.
In order to enable embedded images, you must set the property “html.embed_images” to true in your configuration file.
In the .NET engine, this configuration file is your App.Config file. Or, programmatically, this can be done with `ReportHtml.EmbedImages = true`.
In the Java engine, the configuration file is sometimes called “WindwardReports.properties.” Programmatically, embedded images is enabled with `ProcessHtmlAPI.setEmbedImages(true)`.