xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Arad" <philip_a...@hotmail.com>
Subject Re: Gamma correction in IE5.5
Date Mon, 07 Apr 2003 08:56:15 GMT
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


Mime
View raw message