Friday, 18 April 2008

KML Craziness

Why oh why did KML choose to specify colour values as AGBR ABGR rather than RGBA? Does anyone have a rational explanation for this anomaly?


Matt Giger said...

I completely agree that it is really stupid, or rather a short-sighted decision.

The only thing I can think of would be that the Keyhole guys initially did it that way since that is the standard way OpenGL on Windows represents color planes. It was probably the right decision at the time for the engineers.

At some point this question must have come up and they made a bad decision and chose not to change it since they would have to go back and redo all of their content. I guess they didn't know how big it would get.

Peter Batty said...

Actually it's ABGR :), but I thought it was a weird order too (I was working recently on the whereyougonnabe export to KML).

Christopher Schmidt said...

Much of KML was originally based very closely on the internal representation of KeyHole data structures: the XML was a direct serialization of that data, not changed much. Matt's answer here is probably pretty close to the truth.