Opened 16 years ago

Closed 16 years ago

#2378 closed defect (fixed)

Color binding swaps green and blue values

Reported by: sdlime Owned by: sdlime
Priority: normal Milestone: 5.0.1 release
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by sdlime)

From Jacob D.:

I am trying to make use of the colour binding feature, and it basically works, except... the colours are not quite right. My colours do not match those in MapInfo, although I can make MapInfo emulate the MapServer colours by swapping blue and green around. So basically: my RGB values are interpreted by MapServer as RBG.

and a follow up from Frank W.:

With some pointers from Howard, I found this segment of code in bindColorAttribute() in maputil.c:

attribute->red = atoi(tokens[0]); attribute->blue = atoi(tokens[1]); attribute->green = atoi(tokens[2]);

I think this is responsible. If you are building from source, try just changing it to the more obvious organization. I'd also suggest you file a bug in Trac on the issue we will see if there is a subtle reason for this, or it's just a typo.

Summary:

It's a typo. My test case just changed colors on features and I didn't bother to make sure they were changed to the right color.

Change History (2)

comment:1 by sdlime, 16 years ago

Description: modified (diff)

comment:2 by sdlime, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in both the main and 5.0 branches.

Steve

Note: See TracTickets for help on using tickets.