I have a Wicket page which will dynamically display an image. Let’s say the image is the current date/time.
In HTML, I would have something like
<img src="[dynamically generated]"/>
Assume I have a utility method which returns to me a byte[] of the current image.
public byte[] getCurrImage();
How do I implement this dynamic resource in Wicket (HTML/Java)? I can’t mount a shared resource because the image will keep changing all the time. Do I need to save the image somewhere?
Checkout JFreeChart and wicket example.
There you will see an example of a class that derives from
Imageand it gets abyte[]to dynamically create an image like you asked.