[GRASSLIST:1439] Re: r.patch geotiff-mosaic wrong color problem
Helmer Schack-Kirchner
Helmer.Schack-Kirchner at bodenkunde.uni-freiburg.de
Wed Oct 8 03:41:39 EDT 2003
We had the same problem, but we solved it within GRASS:
1.step: Import the 24-bit image with r.in.gdal (produces three GRASS
raster maps: red, green, blue)
2.step: change the colormap of the channels (red, green, blue) with
r.colors map=... color=grey
3.step: put these modified channels together with r.composite r_map=...
g_map=... b_map=.... output=....
-> The output of r.composite has an unified colormap and can be patched
(or be put together with r.mapcalc) without any color-problems.
Best regards,
Helmer Schack-Kirchner
Richard Greenwood wrote:
> At 11:08 PM 10/7/2003 +0200, you wrote:
>
>> Hello Mr. Greenwood,
>>
>> It worked!!! I did exactly as you told, but I used Corel instead of
>> Gimp.
>> i saved the geotiff header of each original 24bit-image to textfiles.
>> Then I
>> just loaded one tiff, created an optimized 8bit-color palette and
>> saved this
>> palette. Now I just had to reduce each tiff from 24 to 8bit using
>> exactly
>> this palette.
>> Now write back the geotiff header to each image, cause it's lost
>> after saving
>> with corel. Then import all geotiff with r.in.gdal.
>> I checked the color palette files in the .../colr directory to be
>> sure - and
>> yes they had all the same values.
>
>
> I'm glad it worked. You can save a step with gdal_translate - it will
> write out a world file (.tfw) before you convert it with Photoshop or
> Gimp. Then when you r.in.gdal that .tfw file will be read and used to
> georeference the image.
>
>> (I need to invest some time in Gimp, I think reducing images with
>> predefined
>> color palette can be done with it too.)
>
>
> Yes, the steps are very similar to Photoshop (even the menus are
> similar).
>
> Best regards,
> Rich
>
>
>
> Richard W. Greenwood, PLS
> Greenwood Mapping, Inc.
> Rich <at> GreenwoodMap <dot> com
> (307) 733-0203
> http://www.GreenwoodMap.com
--
Dr.Helmer Schack-Kirchner
Institut für Bodenkunde und Waldernährungslehre
Albert-Ludwigs-Universität
79085 Freiburg / Germany
Tel. xx761 203 3612
Fax. xx761 203 3618
More information about the grass-user
mailing list