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 Vossler T <vo...@gmail.com> on 2007/04/07 12:30:39 UTC
any quick fix on java.lang.OutOfMemoryError: Java heap space?
Hi there
Recently I tried to batch convert svg to jpeg files,there is a problems, If
I want to convert image wide and height large than
width 2250 pixel height 2812.5 pixel, the system fail and tell me the error
messages, How can I change this situation in conf file or something else?
I would like to set jpeg about 4800 x 4800 or beyond, here is the command I
TYPE
"java -jar batik-rasterizer.jar -d G:\ -m image/jpeg -w 2250 -h 2812.5 -q
0.8 -dpi 300 E:\svg\*.svg"
My system info as below
Windows xp professional sp2
jre-6u1-windows-i586-p (leastest jre)
batik-1.7beta1
Intel celeron 2.0 G
1G Memory
HARDDRIVE 80G,
HERE is the error messages I got
_________________________________________________________________________________________________
Converting page1.svg to G:\page1.jpg ... Exception in thread "main"
java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(Unknown Source)
at java.awt.image.Raster.createPackedRaster(Unknown Source)
at
java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown
Source)
at java.awt.image.BufferedImage.<init>(Unknown Source)
at
org.apache.batik.transcoder.image.JPEGTranscoder.createImage(Unknown Source)
at
org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source)
at
org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
at
org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
at org.apache.batik.apps.rasterizer.SVGConverter.transcode(Unknown
Source)
at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown
Source)
at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source)
at org.apache.batik.apps.rasterizer.Main.main(Unknown Source)
--
View this message in context: http://www.nabble.com/any-quick-fix-on-java.lang.OutOfMemoryError%3A-Java-heap-space--tf3540394.html#a9882963
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: any quick fix on java.lang.OutOfMemoryError: Java heap space?
Posted by Vossler T <vo...@gmail.com>.
If you add '-Xmx 1024m' before '-jar' it should help a lot. By default
Java restricts it's self to ~64MB of memory the above tells java it can
use
up to ~1Gb of memory.
Hi thomas,
It did work that way. You are really my life savior.
Good day
--
View this message in context: http://www.nabble.com/any-quick-fix-on-java.lang.OutOfMemoryError%3A-Java-heap-space--tf3540394.html#a9892859
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: any quick fix on java.lang.OutOfMemoryError: Java heap space?
Posted by th...@kodak.com.
Hi Vossler,
Vossler T <vo...@gmail.com> wrote on 04/07/2007 06:30:39 AM:
> Recently I tried to batch convert svg to jpeg files,there is a problems,
If
> I want to convert image wide and height large than width 2250 pixel
> height 2812.5 pixel, the system fail and tell me the error
> messages, How can I change this situation in conf file or something
else?
If you add '-Xmx 1024m' before '-jar' it should help a lot. By default
Java restricts it's self to ~64MB of memory the above tells java it can
use
up to ~1Gb of memory.
> I would like to set jpeg about 4800 x 4800 or beyond, here is the
command I
> TYPE
If you want to support arbitrarily large output you would need to
switch
to the TiledTiff transcoder (which would involve writing some java) but
the
above should work for the sizes you list above.
> "java -jar batik-rasterizer.jar -d G:\ -m image/jpeg -w 2250 -h 2812.5
-q
> 0.8 -dpi 300 E:\svg\*.svg"
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org