xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Pettit <kpet...@big-images.com>
Subject Batik-rasterizer writes out corrupt files...
Date Wed, 11 Apr 2007 20:56:07 GMT
When I call 'batik-rasterizer.jar' from the command line it is  
produces complete usable files.

<code>
kardia-3:/Library/Webserver/Documents Kardia$ java -jar batik-1.7/ 
batik-rasterizer.jar -d batik-1.7/samples/ -m image/png batik-1.7/ 
samples/144.svg
About to transcode 1 SVG file(s)

Converting 144.svg to batik-1.7/samples/144.png ... ... success
</code>

The original svg:
http://www.big-images.com/batik_images/144.svg

The successful rasterized image:
http://www.big-images.com/batik_images/144-shell.png

Now if I call the same command through php's exec() command.

<code>
// Execute shell command
exec("java -jar batik-1.7/batik-rasterizer.jar -d batik-1.7/samples/ - 
m image/png -dpi 300 batik-1.7/samples/144.svg");
</code>

I get this 'corrupt' file:
http://www.big-images.com/batik_images/144-batik_php.png

The file's size is 0k.

If I convert the file using a php exec() command with image magic I  
get a usable image.

<code>
// Execute shell command
exec("$imPath/convert -background none 'batik-1.7/samples/144.svg'  
batik-1.7/samples/144.png");
</code>

Resulting image.
http://www.big-images.com/batik_images/144-imageMagick_php.png

Here is my sys info
OS X 10.4.8
Apache 2.2.0
Batik 1.7

Any light that could be shed on this would be appreciated.

Ken...







Ken Pettit
BIG Images
2304 Broad St
San Luis Obispo CA, 93401

email:kpettit@big-images.com
phone:805-781-9301
fax:805-781-9303
it is not the past, but the future that awaits you, that determines  
who you are right now.



Mime
View raw message