You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Yegor Kozlov <ye...@dinom.ru> on 2006/07/17 15:12:53 UTC

Re: Color problems

It's not a bug.
RGB bytes in PowerPoint are swapped, i.e. it stores BGR instead of RGB.
To get the "real" color just exchange red and green.

P.S. This part of code is going to be refactored in nearest future.
We want to make it easier and more user-friendly.
The the architecture is being discussed. See the "object model to work with
styles in PowerPoint" topic in poi-dev.


EE> I am using the following command:


EE> int rgb = richTextRun.getFontColor();
EE> Color myColor = new Color(rgb);



EE> When I call the methods getRed() or getBlue() on myColor, I get the
EE> wrong values (red comes out as blue, and blue comes out as red. Green is
EE> fine).


EE> Am I doing something wrong? Or is this a known bug? What should I do?
EE> Just exchange red and green?

EE> ---------------------------------------------------------------------
EE> To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
EE> Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
EE> The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/