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 Philip Arad <ph...@hotmail.com> on 2003/04/03 09:50:58 UTC
Re: Gamma correction in IE5.5
Re: Gamma correction in IE5.5
Refference to the mail:
http://koala.ilog.fr/batik/mlists/batik-users/archives/msg01062.html
http://koala.ilog.fr/batik/mlists/batik-users/archives/msg01063.html
We have updated batik to batik1.5 and I used:
PNGTranscoder vTranscoder = new PNGTranscoder();
vTranscoder.addTranscodingHint(PNGTranscoder.KEY_GAMMA ,new Float(1.0F/1.942F));
for the gamma correction, but it does not work.It seems that the value is ignore, since with other
values inserted, it gives me the same color.
With regards
Philip
Re: Gamma correction in IE5.5
Posted by Philip Arad <ph...@hotmail.com>.
Dear Chris
Thanks for your reply.
There are no standard definition of the value of 1.942, it is used after
making
a serie of experiments to find the best correction, that will give best
results.
For example:
We need to create a png that has the color:
iTabColor = "#708090";
We pass this attribute to the method that creates a SVG document:
public Document iSVGDocument;
public void createSVGDocument() throws Exception
{
iSVGDocument = createBaseDocument(iName);
Element vRoot = iSVGDocument.getDocumentElement();
createTabBodyElement(iSVGDocument, vRoot, iTabColor);
<------------------ here
...
}
private void createTabBodyElement(Document aDoc, Element aRoot, String
aColor)
{
//TagBody
Element g;
g = aDoc.createElementNS(iSvgNS, "g");
g.setAttributeNS(null, "id", "TagBody");
String vFillColor = "fill:" + aColor;
g.setAttributeNS(null, "style", vFillColor); <-------------------------
here
aRoot.appendChild(g);
Then we use:
vSVGFileURI = new File(aFullSVGFileName).toURL().toString();
TranscoderInput vInput = new TranscoderInput(vSVGFileURI);
PNGTranscoder vTranscoder = new PNGTranscoder();<-------------here we use
this one, as it is, to recieve the wrong color
vTranscoder.transcode(vInput, vOutput);
The color of the image recieved is:#657586 (darker).
For the color: #CCCCCC
I recieve:#C6C6C6
1)I have made a test with #FF0000 (red) and for this color there is no
problem.
2)There is no problem with Netscape/Mozilla.
My conclusion is that the problem is not Batik, but IE.
Thanks
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: Gamma correction in IE5.5
Posted by Chris Lilley <ch...@w3.org>.
On Thursday, April 3, 2003, 9:50:58 AM, Philip wrote:
PA> Re: Gamma correction in IE5.5
PA> Refference to the mail:
PA> http://koala.ilog.fr/batik/mlists/batik-users/archives/msg01062.html
PA> http://koala.ilog.fr/batik/mlists/batik-users/archives/msg01063.html
PA> We have updated batik to batik1.5 and I used:
PA> PNGTranscoder vTranscoder = new PNGTranscoder();
PA> vTranscoder.addTranscodingHint(PNGTranscoder.KEY_GAMMA ,new Float(1.0F/1.942F));
PA> for the gamma correction, but it does not work.It seems that the value is ignore, since with other
PA> values inserted, it gives me the same color.
I would like to see the data that suggests that IE is using a value
of 1.942
--
Chris mailto:chris@w3.org
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org