Hi Javid,

JAVID M ALIMOHIDEEN MEERASA wrote:

Thomas, thanks for your suggestion. I got the canvas renderer after the
first rendering and was able to get
the offscreen buffered image. My problem now is, my canvas display size is
600 x 600, so buffered image size is 600 x 600, but i need a buffered
image of size 3000 x 3000, so that i could send the image to a third
party application which can display it on a higher reslution display
system. IS it possible to do this using Batik API?

    Sure Batik is happy to render to any size canvas.  I don't
think you want to use the JSVGCanvas to do this however.  Probably
the simplest thing would be to create a new subclass of the
batik.transcoder.image.ImageTranscoder.  The baseclass will
handle rendering the document to a BufferedImage and you can do
what ever you want to with it in the 'writeImage' method.

    One word of caution is that a 3Kx3K image will take ~36MB
so you will probably need to increase the memory partition.


Any suggestion are welcome.

Thanks,
Javid

On Tue, 2 Aug 2005, Thomas DeWeese wrote:


Hi Javid,

Javid Alimohideen wrote:


I want to extract the graphics from my JSVGCanvas and send it to another
application's image buffer. I tried JSVGComponent.getOffScreen(), but the
third party application displays nothing. Can someone tell me how to get the
image buffer associated with the JSVGCanvas or JSVGComponent?

   This is the buffer the JSVGComponent is using for display,
but you may be grabbing it too soon.  It only has 'good data' in
it after the first GVT rendering completes.


IS the following possible?
JSVGCanvas canvas;
canvas.renderer.getOffScreen().

   This is actually less reliable as the renderer may be in the
middle of rendering the image.


P.S. I need the data buffer to be displayed by a third party C++
application.

Thanks,
Javid


A clever person solves a problem.
A wise person avoids it.

-- Einstein



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to