Ticket #2458 (closed defect: worksforme)

Opened 5 years ago

Last modified 2 years ago

force_palette deviates from supplied palette file in bad ways (sometimes)...

Reported by: sdlime Owned by: tbonfort
Priority: normal Milestone:
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc: tbonfort, assefa

Description

Setting MapServer to for 24-bit output through a palette can result in unwanted changes. I've only tested with a 128-color palette but output images can contain colors not in that palette and depending on what other colors are present you can get some very strange effects (see first attachment). I suspect this is because extra space is the palette is being filled. In my case the color seeing the change is the background color so it's very apparent. The other drag is that sometimes you only want 128 or whatever colors to minimize file size so filling the rest of the color space is counter productive. What about making the allocation of additional colors an option?

I'm using with TileCache? and the MapServer trunk.

Steve

Attachments

bad_background.png Download (96.5 KB) - added by sdlime 5 years ago.
Notice the variation in color between tile backgrounds…

Change History

Changed 5 years ago by sdlime

Notice the variation in color between tile backgrounds...

Changed 5 years ago by sdlime

  • cc tbonfort, assefa added

Changed 5 years ago by sdlime

Note, that I can work around the issue by adding the background color explicitly to the palette file, then there's no guess work.

Steve

Changed 2 years ago by tbonfort

  • owner changed from sdlime to tbonfort
  • status changed from new to assigned

There is no guarantee the quantization algorithms will choose the same colors for two different images if you don't force them to with a palette file.

The quantization algorithm in use now (i.e. not the GD one) is much better at creating a palette that uses the actual colors from the image, thus preventing these artifacts on adjacent background tiles.

Changed 2 years ago by tbonfort

  • status changed from assigned to closed
  • resolution set to worksforme

closing this one now

Note: See TracTickets for help on using tickets.