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 Peter Becker <pb...@dstc.edu.au> on 2003/09/11 04:18:04 UTC

PNG gamma labeling

[was: Re: Text rendering changes after upgrade to 1.5]

Jim Ley wrote:

>"Peter Becker" <pb...@dstc.edu.au> wrote in message
>news:3F5FCB7B.7090102@dstc.edu.au...
>  
>
>>But let's not play the blame game -- I don't care whose fault it is, I
>>just want the results to be good. At the moment I am not happy with the
>>looks of my website in IE -- which I rarely see myself but unfortunately
>>IE is still the most common browser, so I have to accomodate for that.
>>It seems to be somehow the combination of Batik's rendering of the SVG
>>into PNG with IE's rendering of the PNG onto the screen that causes the
>>problem -- most programs I tried display the PNG as I want it.
>>    
>>
>
>You might want to read Henri Sivonen's review:
>
>http://www.hut.fi/u/hsivonen/png-gamma.html
>  
>
Good reference, thanks for this -- it explains quite a lot. But my 
conclusion from this article and this page linked from it:

  http://www.hut.fi/u/hsivonen/png-gamma-test-results.html

is that I want to encode PNGs without gamma information. That would 
break some Opera versions and some (all?) Safari versions, but (a) these 
are way less important for me than IE and (b) it seems to be that it is 
their implementation which is on the wrong side of things. Also it seems 
that unless Batik does some big magic it can't really know for sure 
which gamma value to use -- so attaching it to the PNGs is also on the 
wrong side of things. Did I get that right?

Is there some option to get Batik not to encode gamma in PNGs? I 
remember having hacked these bits of the code a while ago, but I think I 
just tweaked the numbers. How do I get unlabeled PNGs from Batik?

  Peter


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


Re: PNG gamma labeling

Posted by Thomas DeWeese <Th...@Kodak.com>.
Peter Becker wrote:
> [was: Re: Text rendering changes after upgrade to 1.5]
> 
> Jim Ley wrote:
> 
>> "Peter Becker" <pb...@dstc.edu.au> wrote in message
>> news:3F5FCB7B.7090102@dstc.edu.au...
>>  
>>
>>> But let's not play the blame game -- I don't care whose fault it is, I
>>> just want the results to be good. At the moment I am not happy with the
>>> looks of my website in IE -- which I rarely see myself but unfortunately
>>> IE is still the most common browser, so I have to accomodate for that.
>>> It seems to be somehow the combination of Batik's rendering of the SVG
>>> into PNG with IE's rendering of the PNG onto the screen that causes the
>>> problem -- most programs I tried display the PNG as I want it.
>>>   
>>
>>
>> You might want to read Henri Sivonen's review:
>>
>> http://www.hut.fi/u/hsivonen/png-gamma.html
>>  
>>
> Good reference, thanks for this -- it explains quite a lot. But my 
> conclusion from this article and this page linked from it:
> 
>  http://www.hut.fi/u/hsivonen/png-gamma-test-results.html
> 
> is that I want to encode PNGs without gamma information. That would 
> break some Opera versions and some (all?) Safari versions, but (a) these 
> are way less important for me than IE and (b) it seems to be that it is 
> their implementation which is on the wrong side of things. Also it seems 
> that unless Batik does some big magic it can't really know for sure 
> which gamma value to use -- so attaching it to the PNGs is also on the 
> wrong side of things. Did I get that right?
> 
> Is there some option to get Batik not to encode gamma in PNGs? I 
> remember having hacked these bits of the code a while ago, but I think I 
> just tweaked the numbers. How do I get unlabeled PNGs from Batik?

    I sent my previous response because it contained lots of useful information.
Currently Batik (in fact our PNG transcoder) will _always_ generate a gAMA
chunk.  The code for this is the '.5' rounding fix I mentioned in my previous
note.  You would need to add a new parameter to the PNGEncodeParam object
and then a new transcoder hint to the PNGTranscoder and then add it to the
command line handing in the rasterizer - to fully export it.

    As I said in my other note Batik would probably accept a proper contribution
but generating broken PNG's is not something I will spend any time on.



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