<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=156160212-06062006>Zhonghai,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=156160212-06062006>My
guess is that both the gdal_warp and gdal_merge utilities use the pusedo colour
table of the first image and apply that table to all other images, I would try
converting the gif to RGB geotiffs using the pct2rgb gdal utility then go
through your processing steps(warping and merging) then convert the
images back to 8bit GIFs. I hope this helps</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=156160212-06062006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=156160212-06062006>Travis</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> UMN MapServer Users List
[mailto:MAPSERVER-USERS@LISTS.UMN.EDU]<B>On Behalf Of </B>Zhonghai
Wang<BR><B>Sent:</B> Tuesday, June 06, 2006 6:35 AM<BR><B>To:</B>
MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> [UMN_MAPSERVER-USERS] raster
image preprocessing problem.<BR><BR></FONT></DIV>
<DIV>Hi there,</DIV>
<DIV> </DIV>
<DIV>I have a couple of GIFs with wld files, but the original Projection is
not the one I want, I tried to use the Proj4 to reproject them on-the-fly, but
it takes really long to perform the map request, therefore I tried
to preprocess the images with GDAL tools, but I've got some problems
here: </DIV>
<DIV> </DIV>
<DIV>1. problem with gdalwarp: trying to mosaic the images into one
output file, but only the first image has the correct image color, the other
images are rendered with strange colors, is this a common problem if using
gdalwarp to mosaic images? </DIV>
<DIV> </DIV>
<DIV>2.problem with gdal_merge.py: after trying the gdalwarp command, I've
tried the gdal_merge.py command to merge all the images together with the -pct
parameter, unfortunately, the merged image is the same as the first try. is it
possible to merge images using the command with the correct color table?
</DIV>
<DIV> </DIV>
<DIV>BTW: I can not use the gdal_translate command, since there are gaps
between the reprojected images.</DIV>
<DIV> </DIV>
<DIV>thanks for your info.</DIV>
<DIV> </DIV>
<DIV>zhonghai</DIV></BLOCKQUOTE></BODY></HTML>