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 Ken Pettit <kp...@big-images.com> on 2007/04/11 22:56:07 UTC

Batik-rasterizer writes out corrupt files...

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.



Re: Batik-rasterizer writes out corrupt files...

Posted by th...@kodak.com.
Hi Ken,

Ken Pettit <kp...@big-images.com> wrote on 04/11/2007 04:56:07 PM:

> When I call 'batik-rasterizer.jar' from the command line it is 
> produces complete usable files.
> 
> Now if I call the same command through php's exec() command.
> 
> I get this 'corrupt' file:
> The file's size is 0k.

   It sounds to me like a permission or working directory issue.


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