instantiate a wicket image, with the resource.. It will not change the
format.. Just set the format to svg..
Manuel Corrales wrote:
Thanks, but still dont get it. I did that, but now how can i add this image
to a page? The add method on page does not accept this DynamicImageResource.
Also, this will render the svg directly to the page? Or will transform it to
other format? (the documentation on DynamicImageResource only mention PNG,
JPG and GIF).
Thanks!
On Sun, Jun 29, 2008 at 5:40 AM, Nino Saturnino Martinez Vazquez Wael <
[EMAIL PROTECTED]> wrote:
somewhat like this, and then just add the image as an image...:
import org.apache.wicket.markup.html.image.resource.DynamicImageResource;
public class ImageResource extends DynamicImageResource {
// has to save this. or get the image another way!
private byte[] image;
public ImageResource(byte[] image, String format) {
this.image = image;
setFormat(format);
}
public ImageResource(BufferedImage image) {
this.image = toImageData(image);
}
@Override
protected byte[] getImageData() {
if (image != null) {
return image;
} else {
return new byte[0];
}
}
}
Manuel Corrales wrote:
Hi, i have some jfreechart generated images on my application. I did this
using an example on the wicket wiki. I wonder if i can do the same thing,
but sending an SVG image to the client. I have the svg generated by
jfreechar but now i dont know how can i use this on the html and on the
Page
with wicket. Can anyone help me?
Thanks in advance.
Best regards.
Manuel.
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]