Gergely Hajdu wrote:

Finally Thomas, I've managed to run the program :=)
But there are just a small bit missing....The created
TIFF-image can't be viewed, I just see a black background.

Actually you are seeing opaque black text on a transparent black background :) You either need to insert an opaque white rectangle into the SVG source (before everything else). Use software that understands alpha channels, or write code to 'flatten the image' (* this is non-trivial).

tit.addTranscodingHint( ImageTranscoder.KEY_BACKGROUND_COLOR, // ADDED MYSELF
                                Color.white );

This would be one of the bells and whistles not supported by the tiled transcoder.

The TIFF is now just 14000 byte ( suspiciously small...). What does the
KEY_WIDTH and KEY_HEIGHT mean ?

This is the size of the image in pixels. So you are generating a 100x100 pixel image with 4 channels of 8 bits (1byte) each:

        100*100*4*1 = 40,000 bytes uncompressed I could easily
believe 14,000 bytes compressed.  Although 100x100 may not be close
to big enough for your needs.

By the way, setting the background Color.white is not seen in the result.

Again, million thanks for your help ! Now it's just the final step left. So
if you could help me with this, I would be REALLY happy :=)

Regards
/Gergely

-----Original Message-----
From: Thomas DeWeese [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 04, 2003 3:41 PM
To: Batik Users
Subject: Re: How to use "org.apache.batik.ext.awt.image.codec.tiff " ?


Gergely Hajdu wrote:




You are right, I meant baseclass method. I have removed the
batik.jar from FOP, but then I just got some other error.

java.lang.NoClassDefFoundError: org/apache/batik/i18n/Localizable
        at java.lang.ClassLoader.defineClass0(Native Method)

> [...]


Exception in thread "main"

The jar's I've included to the classpath is the follow

batik-1.5.zip/batik-1.5/*.jar
batik-1.5.zip/batik-1.5/lib/*.jar


   Are you sure you have all of these (there are a lot of them).
In particular the above mentioned class is from 'lib/batik-util.jar'


batik-1.5.zip/batik-1.5/extensions/*.jar

When I removed the batik.jar ( FOP version ) I could find the

"KEY_INDEXED"


field as well.

I really appreciate your help !






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