Opened 16 years ago
Closed 13 years ago
#2458 closed defect (worksforme)
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 (1)
Change History (5)
by , 16 years ago
Attachment: | bad_background.png added |
---|
comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 16 years ago
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
comment:3 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → 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.
Notice the variation in color between tile backgrounds...