[Mapserver-users] reducing RGB maps to 8bit
Richard Greenwood
rich at greenwoodmap.com
Mon Mar 22 20:44:02 PST 2004
Jan Hartmann wrote:
> Hi,
>
> Not a specific MapServer question, but I guess there are people on this
> list who know something about this. I have about 600 historical
> cadastral maps dating from about 1830. They have been scanned as 24bits
> jpg files, and each map is about 4000*4000 pixels. To display them
> efficiently with MapServer I need to transform them to 8bit, all in the
> same palette. Colors on the different maps don't match exactly, due to
> two centuries of wear and tear The question is: does anyone know a way
> to compute some sort of optimal colormap for this amount of data,
> something like "imagemagick -display" or the gdal-utility "rgb2pct.py",
> not for a single file, but for a large set of images. There is some
> literature about it, e.g. "comp.graphics.algorithms 3.02" and "graphics
> gems", but before I start programming myself, perhaps someone knows an
> easier way.
I have used a "brute force" approach in the past:
1. Copy a representative sample of the images into a single composite image.
2. Use the Gimp or Photoshop to create an optimal color palette from the
composite.
3. Save the palette, and then apply it to your whole image set.
You mention "cadastral maps dating from about 1830", my state was not
even a state until 1890!
Regards,
--
Richard Greenwood
www.greenwoodmap.com
More information about the MapServer-users
mailing list