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 soniya kamath <so...@cisco.com> on 2001/07/24 04:06:36 UTC

background should remain transparent during conversion

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?

Thanks,
Soniya


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


Re: background should remain transparent during conversion

Posted by Thierry Kormann <tk...@ilog.fr>.
On Tuesday 24 July 2001 13:16, Thomas E Deweese wrote:
> >>>>> "TK" == Thierry Kormann <tk...@ilog.fr> 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', 

Yes this is what I wanted to say :)
Sorry.

Thierry.


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


Re: background should remain transparent during conversion

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "TK" == Thierry Kormann <tk...@ilog.fr> 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: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: background should remain transparent during conversion

Posted by Thierry Kormann <tk...@ilog.fr>.
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?

Jpeg images are transparent. PNG images support transparency so I highly 
recommend you to generate PNG (using the PNGImageTranscoder) then JPEG.

Thierry.


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