[Gdal-dev] gdalwarp HFA color problem
Frank Warmerdam
warmerdam at pobox.com
Tue Oct 26 19:47:22 EDT 2004
Markus Neteler wrote:
> On Tue, Oct 26, 2004 at 01:50:40PM -0400, Frank Warmerdam wrote:
>
> Frank,
> thanks for the quick response. I did an complete recompilation, but still
> no luck. However, some changes now:
...
> There is still something not reaching the new color table as
> the resulting image appears almost black.
Markus,
I found one serious botch in my SetColorTable() code. You might want to check
out the latest and try again.
> And
> gdalwarp -t_srs '+init=epsg:4326' hanoi_lsat7_brovey_UTM48N.img hanoi_lsat7_brovey_LL.tif
> Creating output file is that 1482P x 2770L.
> Segmentation fault
>
> as before (in GDALSetRasterColorTable(), GDALWarpCreateOutput()).
>
> If I should upload this file somewhere please let me know.
> Otherwise it is still in the web site as indicated in the previous
> mail.
I am not getting this crash but looking through the code I can see how it
could happen. I have committed a bunch of changes in geotiff.cpp to support
writing colormaps for *16bit* data. You will find you need to force your
band type to UInt16 for this though. How a TIFF colormap should be applied
to a signed 16bit band was too confusing for me, so I stipulate in the code
that the band must be UInt16. You can use the "-ot UInt16" in your gdalwarp
call to make this happen.
I also added better error checking so datatypes for which I don't support
colormaps properly will report errors instead of doing weird and dangerous things.
All this exercise for 16bit colormaps is uncovering lots of issues!
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list