You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "K, Balamurugan (CORP, GEITC)" <Ba...@geind.ge.com> on 2002/03/07 04:53:30 UTC

Getting rendered image from JSVGCanvas

Dear friends,
	 I am new to Batik. I need help from u guys. I have a requirement. I
have to show vector graphics to get high resolution. I need to create icons
which will have images. When i resize that icon i will lose the resolution
if the image is gif or any raster based. JSVGCanvas is the best one for that
but for each icon i can't use JSVGCanvas. It is very slow.
	What i am thinking to solve this problem is, i will use svg. For
that i need to know how to acces the rendered image object from JSVGCanvas.
If i know how to do that each time when i resize i will get the new rendered
image from JSVGCanvas in that way i wont lose the resolution. I think this
will be more useful for different projects as well. It will be greatful if
any one show me the right direction.

Thanks in advance
Bala 





"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this 
communication is strictly Prohibited. 
If you have received this message by error, please notify us 
immediately, return the original mail to the sender and delete the 
message from your system."


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Use of SVG DTD in Batik

Posted by Milan Trninic <mt...@galdosinc.com>.
Hello,

I am interested in exact specification of how SVG DTD is used in processing svg contents. In particular:

1. Is it the rule that batik loads svg dtd on processing. (either remote or local)?
2. Can it be avoided?
3. What are the plans for future - mandatory or not?
4. Why does it do that? Doesn't it make sense on some occasions to allow unvalidated processing of svg?

Thank you a lot

Milan Trninic

Getting rendered image from JSVGCanvas

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "BK" == K, Balamurugan (CORP, GEITC) <Ba...@geind.ge.com> writes:

BK> I am new to Batik. I need help from u guys. I have a
BK> requirement. I have to show vector graphics to get high
BK> resolution. I need to create icons which will have images. When i
BK> resize that icon i will lose the resolution if the image is gif or
BK> any raster based. JSVGCanvas is the best one for that but for each
BK> icon i can't use JSVGCanvas. It is very slow.  What i am thinking
BK> to solve this problem is, i will use svg. For that i need to know
BK> how to acces the rendered image object from JSVGCanvas.  If i know
BK> how to do that each time when i resize i will get the new rendered
BK> image from JSVGCanvas in that way i wont lose the resolution. I
BK> think this will be more useful for different projects as well. It
BK> will be greatful if any one show me the right direction.

    I don't think I fully understand what you are asking for.  But it
sounds like you want to put SVG icons over a very high resolution
image.  If your High resolution image is done using RenderableImage
(say from JAI).  You should be able to fairly easily construct a
single SVG document that has that image in the background (by
extending the image tag: see extending Batik on our web site).  And
then has a bunch of use's or what ever to place the icons over the
image.  This would have JSVGCanvas display everything (instead of a
JSVG canvas per icon).

    Alternatively, You can build the GVT tree (either use the
JSVGCanvas since it has a really simple interface or look at the
Slideshow application: ...batik.apps.slideshow) and ask the GVT tree
(batik.gvt.GraphicsNode) for it's RenderableImage
(getGraphicsNodeRable, this returns a Filter but that just extends
java.awt.image.renderable.RenderableImage with a few extra methods).
You can then call createRendering with an appropriate RenderContext to
get proper renderings.

BK> Thanks in advance Bala

    Hope the above is helpful.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


RE: Benchmark Test

Posted by Tangent <ta...@usa.net>.
Thanks for suggestions, I chose mathMetal, bookOfKells and
textRotateShadows for my test, and I am still running it.

I am new to Batik, and I wish I could understand what Thomas means ...
The lower core modules are still way above my head at the moment.  But I
would like to know the dependencies of Batik Transcoder as I am
considering porting it to C# eventually.

Thanks!

- Tangent

> -----Original Message-----
> From: Thomas E Deweese [mailto:thomas.deweese@kodak.com] 
> Sent: Thursday, March 07, 2002 7:30 AM
> To: Batik Users
> Cc: tangent@usa.net
> Subject: RE: Benchmark Test
> 
> 
> >>>>> "TK" == Thierry Kormann <tk...@ilog.fr> writes:
> 
> >> I am going to run some extremely high-resolution 
> rasterization test 
> >> using Batik.  I would like to test it against couple SVG 
> files that 
> >> has various complexity.  Any suggestions?
> 
> TK> There are some documents in the samples directory such 
> the maps that 
> TK> seem a good candidate for that. I also think your benchmark can 
> TK> separate documents with or without filters or other 'expensive' 
> TK> effects.
> 
>     I would also point out that the way things get rendered 
> internally is much more flexable than the way the current 
> rasterizer does things (get the whole image as a 
> BufferedImage).  If I were interested in doing very high 
> resolution rasterization I would grab the root GVT elements 
> RenderableImage representation (getGraphicsNodeRable) then 
> create a RenderedImage from that (createRendering).  Then I 
> would use the tile interface on that object to stream the 
> image to a file.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


RE: Benchmark Test

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "TK" == Thierry Kormann <tk...@ilog.fr> writes:

>> I am going to run some extremely high-resolution rasterization test
>> using Batik.  I would like to test it against couple SVG files that
>> has various complexity.  Any suggestions?

TK> There are some documents in the samples directory such the maps
TK> that seem a good candidate for that. I also think your benchmark
TK> can separate documents with or without filters or other
TK> 'expensive' effects.

    I would also point out that the way things get rendered internally
is much more flexable than the way the current rasterizer does things
(get the whole image as a BufferedImage).  If I were interested in
doing very high resolution rasterization I would grab the root GVT
elements RenderableImage representation (getGraphicsNodeRable) then
create a RenderedImage from that (createRendering).  Then I would use
the tile interface on that object to stream the image to a file.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


RE: Benchmark Test

Posted by Thierry Kormann <tk...@ilog.fr>.

> I am going to run some extremely high-resolution rasterization test
> using Batik.  I would like to test it against couple SVG files that has
> various complexity.  Any suggestions?

There are some documents in the samples directory such the maps that seem a
good candidate for that. I also think your benchmark can separate documents
with or without filters or other 'expensive' effects.


Thierry.



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Benchmark Test

Posted by Tangent <ta...@usa.net>.
Hi,

I am going to run some extremely high-resolution rasterization test
using Batik.  I would like to test it against couple SVG files that has
various complexity.  Any suggestions?

- Tangent

P.S.  The test will involve the comparison of rasterizing the SVG
entirely, and slicing it to couple parts and one part at a time.  I
believe the second one requires less memory and could out perform the
first one in some circumstance.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org