How would you generate an JPG image file containing data fields that are stored and updated within a database table? The image would then be regenerated every hour or so reflecting the latest values within the database table.
You would start with a basic background image, and then the generated image should contain data fields (e.g. average temperature, cpu load, time since last reboot etc.) overlayed on top of the background image. The data would be visualized with nice charts, icons and fonts.
Thanks!
EDIT: Good stuff. There are many good suggestions covering charting especially like JFreechart. I'm still a bit unsure on how best to work with overlaying images (i.e. icons) over a background image. Would the basic Java API be best for this case?
TIA!
Check out the Java Tutorial on 2D Graphics. You could load your background image as a BufferedImage
using ImageIO.read()
, and then draw text on it using Graphics.drawString()
. You could then save the image using ImageIO.write()
.
The OP has added more sophisticated requirements (nice charts, icons and fonts). In this case, one of the many charting or reporting packages (e.g. JFreeChart, JasperForge) would be more suitable.