[gdal-dev] Combining TIFFs w/ different color palettes

2011-01-05 Thread MyKillK

Hello all,

My question is simple. Is it possible to combine two GeoTIFFs, each with its
own unique color palette into a single image that is properly color mapped?
Each image only has 16 colors so I feel like it should be possible to copy
Image #1's color table straight into indexes 0-15 and then remap Image #2's
color table to indexes 16-31. For the life of I can't figure out how this
can be done, it always wants to use Image #1's color table alone in the
merged TIFF.

Thanks,
Michael
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Combining-TIFFs-w-different-color-palettes-tp5893567p5893567.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Combining TIFFs w/ different color palettes

2011-01-05 Thread Frank Warmerdam

On 11-01-05 04:06 PM, MyKillK wrote:


Hello all,

My question is simple. Is it possible to combine two GeoTIFFs, each with its
own unique color palette into a single image that is properly color mapped?
Each image only has 16 colors so I feel like it should be possible to copy
Image #1's color table straight into indexes 0-15 and then remap Image #2's
color table to indexes 16-31. For the life of I can't figure out how this
can be done, it always wants to use Image #1's color table alone in the
merged TIFF.


Michael,

I am not aware of any existing GDAL application to do this.  You  could
use pct2rgb.py on each image, merge the RGB images, and then use rgb2pct.py
to produce a paletted image from the result that would likely have 32 colors.

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Combining TIFFs w/ different color palettes

2011-01-06 Thread Michael Koehmstedt
That's a shame. I just might have to write my own GDAL tool to accomplish
this then (should be a fun way to learn the GDAL library as well). I've
tried converting to RGB and going from there, but the resulting file sizes
become very large in comparison and take hours to merge.

On Wed, Jan 5, 2011 at 2:12 PM, Frank Warmerdam  wrote:

> On 11-01-05 04:06 PM, MyKillK wrote:
>
>>
>> Hello all,
>>
>> My question is simple. Is it possible to combine two GeoTIFFs, each with
>> its
>> own unique color palette into a single image that is properly color
>> mapped?
>> Each image only has 16 colors so I feel like it should be possible to copy
>> Image #1's color table straight into indexes 0-15 and then remap Image
>> #2's
>> color table to indexes 16-31. For the life of I can't figure out how this
>> can be done, it always wants to use Image #1's color table alone in the
>> merged TIFF.
>>
>
> Michael,
>
> I am not aware of any existing GDAL application to do this.  You  could
> use pct2rgb.py on each image, merge the RGB images, and then use rgb2pct.py
> to produce a paletted image from the result that would likely have 32
> colors.
>
> Best regards,
> --
>
> ---+--
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmer...@pobox.com
> light and sound - activate the windows | 
> http://pobox.com/~warmerdam
> and watch the world go round - Rush| Geospatial Programmer for Rent
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Michael Koehmstedt
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev