[Mapserver-users] colouring problems
Bart van den Eijnden
bartvde at xs4all.nl
Tue Dec 9 12:39:52 PST 2003
Hi Frank,
the strange thing is that I also had this problem when cascading images
coming from ArcIMS.
We tried both PNG 8 bit and PNG 24 bit output from ArcIMS, and png24
output in Mapserver. Then also these problems arose.
In that case (png24 output in Mapserver), Mapserver could not run out of
colours could it?
There is no way to define a colour table in the map file for example?
Best regards,
Bart
On Tue, 09 Dec 2003 15:34:21 -0500, Frank Warmerdam <warmerdam at pobox.com>
wrote:
> Bart van den Eijnden wrote:
>> Hi list,
>>
>> we are having some colouring issues with Mapserver on for example ECW
>> files. These colouring issues only occur with raster layers that most
>> of the time represent topographical maps.
>> Sometimes white is getting almost pink/purple in some of the
>> topographical maps.
>>
>> I have attached 2 small images (sorry for anyone who does not want
>> attachments at this mailing list) illustrating the problem.
>>
>> Does anybody know how to solve this colouring issue?
>
> Bart,
>
> Without inspecting the .ecw files, the map file and so forth it is hard
> to
> be sure what is happening. However, I would guess that the "blank" areas
> in the ECW are some a grey however by the point the ECW layer is rendered
> there are very few (or no) colors left available for allocation. So it
> has to use the existing colors. I would guess the ECW grey varies a bit,
> and in the areas that show pink that was the closest color, and the other
> areas the white was the closest.
>
> Assuming you don't want to switch to 24bit output, I would suggest the
> best approach is to "trick" MapServer into allocating some colors that
> are good for the ECW file. In particular, add an early layer with a
> color that is approximately the grey appearing in the ECW background.
>
> I haven't played around with tricking mapserver into allocating colors
> without actually drawing anything. It might be sufficient to have a
> vector layer with classes for each color you want to force allocate, but
> the corresponding shapefile empty so nothing gets rendered.
>
> Best regards,
>
--
More information about the MapServer-users
mailing list