>>>>> "TK" == Thierry Kormann <[EMAIL PROTECTED]> writes:

TK> On Tuesday 24 July 2001 04:06, soniya kamath wrote:
>> Hi,
>> 
>> I am converting SVG to JPEG using the JPEGTranscoder. During the
>> conversion the SVG image loses its transparency. I want the
>> background of the SVG and JPEG image to be transparent. How do I
>> achieve this?

TK> Jpeg images are transparent. 
                ^^^

    I think he meant to say 'aren't', as there is no official way to
store Alpha channel information in a JPEG (or perhaps more correctly
JFIF).  There have been a number of hacks that people have employed
over time to store alpha information using JPEG compression, but what
one would work for you would depend on what the destination of the
image is, hence it would not be appropriate for a general piece of
software like Batik to try and support these application specific
hacks.

TK> PNG images support transparency so I highly recommend you to
TK> generate PNG (using the PNGImageTranscoder) then JPEG.

    I concur with Thierry that PNG is probably a much better solution
for you.  However if you have no other choice, a bit of energy, and
documentation on what the destination is expecting you can probably
get what you need by modifying our JPEGTranscoder and adjusting the
way that the JPEGCodec is invoked.

    Good luck.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to