I'm printing text to an image before adding it to the page. Right now the
process goes like this:
final BufferedDynamicImageResource resource = new
BufferedDynamicImageResource();
java.awt.image.BufferedImage image;
image = ImageIO.read(new File("C:\\path\\to\\image.png"));
Graphics graphics = image.getGraphics();
graphics.drawString(user.getName(), 443, 215);
resource.setImage(image);
add(new Image("bothCardImage", resource));
In order to keep everything relative to the Wicket framework, I want to
replace
java.awt.image.BufferedImage image = ImageIO.read(new
File("C:\\path\\to\\image.png"));
Graphics graphics = image.getGraphics();
with
org.apache.wicket.markup.html.image.Image wicketImage;
wicketImage = new Image("img", new
ResourceReference(ImageAnchor.class, "image.png"));
Graphics graphics = wicketImage.getGraphics();
However, I can't figure out how to "getGraphics()" from a Wicket Image. Any
suggestions? Thanks much!
--
View this message in context:
http://www.nabble.com/Wicket-Image--%3E-Java-Image-tp19034138p19034138.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]