Gergely Hajdu wrote:

The problem was not in the JDK ( tried both 1.3 & 1.4.2). I just had to
add the parameter <-scriptSecurityOff > to the script to make it run.
But it seems like the parameters to this script has no meaning (i.e I
am using them the wrong way ) :
My call to the script looks like :

-scriptSecurityOff -w 1024 -h 1024 -bg 255.255.255.255 -dpi 1 -q 0.01 -d
. -m image/tiff BPOBeanTemplate.svg

i.e
1.The picture should be just 1024*1024 pixels
2.background color is white
3.The quality is VERY low ( -q = 0.01, where 0 < q < 1 and default is 0.99)

This has no effect for TIFF. This is only used for JPEG.


4.Resolution ( -dpi = 1 , default is 96) is very low.

I'm not sure this has any effect if you are using W/H (it certainly doesn't for file size - but if might effect what portion of the document is rendered).

And still the size of the rendered TIFF is 4MB ?? Are there ANY parameters
to be used to compress the image if using this batik.rasterizer.jar ?

So 4MB comes from 1024(width)*1024(height)*4(bytes/pixel) = 4MB. You already know about the Tiled Tiff Encoder which allows compressed TIFF's but the other software you are using doesn't support this.

   The only other approach you can take is to reduce the image from
32bpp to 8 or 4 or 1 bits/pixel.  You could take a look at the PNG
code (for generating 'palettized' images) and try applying the same
techniques to the TIFF encoder.  However even at 1bpp your image
would still be > 100K.

   From other messages it sounds like your other software may support
G4 compressed TIFFs, but our TIFF encoder doesn't support encoding
with G4.

Is the only way to shrink the imagesize to change width and height of the
output image ?

It looks like it may be the only way you have available to you. You could look around for someone who has written a G4 encoder for Tiff.


Regards /Gergely

-----Original Message-----
From: Thomas DeWeese [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 7:12 PM
To: Batik Users
Subject: Re: AccessControlException when using batik-rasterizer


Hi Gergely,


Gergely Hajdu wrote:


http://xml.apache.org/batik/svgrasterizer.html

which looks like :
java -jar batik-rasterizer.jar -d myDir -m image/jpeg samples/*.svg
that generates JPEG images for all the SVG files found in the samples
directory.


But I got the following exception :
java.security.AccessControlException: access denied
(java.util.PropertyPermission java.security.policy write)
at


     I've never seen this problem before.  It seems like something is
not granting the Application 'full' permissions.  Do you know if
someone has adjusted the default permissions for the JDK you are using?


java.security.AccessControlContext.checkPermission(AccessControlContext.java


:267)
at

java.security.AccessController.checkPermission(AccessController.java:394)


at java.lang.SecurityManager.checkPermission(SecurityManager.java:540)
at java.lang.System.setProperty(System.java:636)
at


org.apache.batik.util.ApplicationSecurityEnforcer.installSecurityManager(Unk


nown Source)
at

org.apache.batik.util.ApplicationSecurityEnforcer.enforceSecurity(Unknown


Source)
at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source)
at org.apache.batik.apps.rasterizer.Main.main(Unknown Source)
Exception in thread "main"
Any ideas how to correct this ?
Thanks in advance.
/Gergely



---------------------------------------------------------------------
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