xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Vidov" <mvi...@hotmail.com>
Subject How to improve load time of PNG images?
Date Mon, 12 Aug 2002 17:24:00 GMT
What can be done to improve load times of PNG images? Can batik be made to 
use JAI and its native libraries? Is there a portion of batik that that can 
be optimized or skipped to improve this specific case (eg decoding, scaling, 

Some details:

I'm using batik to display very simple svgs consisting of an image tag and a 
handful of simple elements (text, rect). The images are PNG files, with a 
typical file being 3200 x 2200 x 4 color (file size around 240KB).

Load times in squiggle (PIII 1000MHz, GeForce2) are 6-8 seconds (GVT build 
around 3500ms and GVT render around 3500ms). Total load time in Adobe SVG is 
less than 1 second.

Loading and rendering the PNG file in java using Graphics.drawImage with 
scaling (Image.SCALE_FAST) is around 10 seconds.

However when I use JDK 1.4.0 with JAI 1.1.1 java rendering drops to less 
than 2 seconds. Using the same JDK and JAI with squiggle produces no 

I'm wondering why JAI adds no benefit. The comparison to Adobe is also 
shocking. (Adobe also uses some smoothing to make my PNG files look much 
better than in batik.)

This issue is critical and my only alternative seems to be to wrap Adobe 
with JNI (a big pain since Adobe no longer supports its COM interfaces).

Any ideas or comments would be much appreciated.

MSN Photos is the easiest way to share and print your photos: 

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

View raw message