You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Dave Meibusch <Da...@adc.com> on 2004/07/20 02:02:12 UTC

Transparency with PNG transcoder

Hi all,
I've been using Batik very successfully to generate raster thumbnails of SVG
images for a web application.
A recent change to a beige background on the web site revealed to me that
the PNG raster images did not have transparent backgrounds (the SVG images
do correctly display with transparent backgrounds with Adobe plugin).
I've read through the source for Rasterizer and the PNG encoder classes, but
it's not apparent how I can get tranparency working.
Can anyone point me in the right direction?

thanks in advance,
Dave




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


Re: Transparency with PNG transcoder

Posted by Dave Meibusch <Da...@adc.com>.
> > I've been using Batik very successfully to generate raster thumbnails of
SVG
> > images for a web application.
> > A recent change to a beige background on the web site revealed to me
that
> > the PNG raster images did not have transparent backgrounds (the SVG
images
> > do correctly display with transparent backgrounds with Adobe plugin).
> > I've read through the source for Rasterizer and the PNG encoder classes,
but
> > it's not apparent how I can get tranparency working.
> > Can anyone point me in the right direction?
>
> As far as I know, batik PNG Transcoder support alpha channel correctly,
> however, some image viewer/browser doesn't support it. There is an
> option on PNG Transcoder KEY_FORCE_TRANSPARENT_WHITE which you can set
> during transcoding to workaround this problem.
>
> Please keep in mind that using Force Transparent White option the result
> image will display differently over a white background in a viewer that
> supports transparency.
>
> Regards
> Tonny Kohar
> --
> Sketsa
> SVG Graphics Editor
> http://www.kiyut.com

Tonny,
You are correct.
MS IE 5.5 does not correctly support the alpha-channel in the PNG.
Firefox does display it correctly.
I followed the numerous google trails and I'm now shaking my fist at M$ like
everyone else...

thanks
Dave




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


Re: Transparency with PNG transcoder

Posted by Tonny Kohar <to...@kiyut.com>.
Hi,

> I've been using Batik very successfully to generate raster thumbnails of SVG
> images for a web application.
> A recent change to a beige background on the web site revealed to me that
> the PNG raster images did not have transparent backgrounds (the SVG images
> do correctly display with transparent backgrounds with Adobe plugin).
> I've read through the source for Rasterizer and the PNG encoder classes, but
> it's not apparent how I can get tranparency working.
> Can anyone point me in the right direction?

As far as I know, batik PNG Transcoder support alpha channel correctly,
however, some image viewer/browser doesn't support it. There is an
option on PNG Transcoder KEY_FORCE_TRANSPARENT_WHITE which you can set
during transcoding to workaround this problem. 

Please keep in mind that using Force Transparent White option the result
image will display differently over a white background in a viewer that
supports transparency. 

Regards
Tonny Kohar
-- 
Sketsa 
SVG Graphics Editor
http://www.kiyut.com



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


Re: Transparency with PNG transcoder

Posted by lance dyas <la...@inetnebr.com>.
lance dyas wrote:

> Dave Meibusch wrote:
>
>> Hi all,
>> I've been using Batik very successfully to generate raster thumbnails 
>> of SVG
>> images for a web application.
>> A recent change to a beige background on the web site revealed to me 
>> that
>> the PNG raster images did not have transparent backgrounds (the SVG 
>> images
>> do correctly display with transparent backgrounds with Adobe plugin).
>>  
>>
> Internet Exploder does not correctly support 24 bit pngs with 8bit 
> transparency
> unless you basically force it to. A trick can be used involving HTC's 
> and such can be used to
> make this work. The transparency works seemlessly in Mozilla you will 
> probably find.
>  

Arrrghh that was nearly incoherent....

http://www.koivi.com/ie-png-transparency/





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


Re: Transparency with PNG transcoder

Posted by lance dyas <la...@inetnebr.com>.
Dave Meibusch wrote:

>Hi all,
>I've been using Batik very successfully to generate raster thumbnails of SVG
>images for a web application.
>A recent change to a beige background on the web site revealed to me that
>the PNG raster images did not have transparent backgrounds (the SVG images
>do correctly display with transparent backgrounds with Adobe plugin).
>  
>
 Internet Exploder does not correctly support 24 bit pngs with 8bit 
transparency
unless you basically force it to. A trick can be used involving HTC's 
and such can be used to
make this work. The transparency works seemlessly in Mozilla you will 
probably find.


-- Lance Dyas
Lost Worlds Roleplaying - at the Decision Driven Gaming Center
http://www.dyasdesigns.com/roleplay/LostWorlds



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