I wonder if it is possible to draw a BufferedImage
to a regular tooltip.
As described here, an image may be placed into a tooltip by using HTML and an image element pointing to the URL of the image. So I tried to encode the BufferedImage
in base64 like this and used the following HTML as tooltip text:
"<html><img src=\"data:image/png;base64," + Base64.encode(out.toByteArray()) + "\"></html>"
Unfortunately this doesn't work. Am I missing something or are the HTML capabilities of a tooltip too limited to support base64 encoded images? Is there any other way to display a dynamically generated image like a tooltip?