Ticket #2378 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

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) (diff)

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

Changed 6 years ago by sdlime

  • description modified (diff)

Changed 6 years ago by sdlime

  • status changed from new to closed
  • resolution set to fixed

Fixed in both the main and 5.0 branches.

Steve

Note: See TracTickets for help on using tickets.