<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE>@font-face {
        font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
P {
        FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman"
}
SPAN.emailstyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial
}
SPAN.emailstyle19 {
        COLOR: navy; FONT-FAMILY: Arial
}
SPAN.EmailStyle20 {
        COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=818302921-14012004><FONT face=Arial
color=#0000ff size=2>Brian -</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=818302921-14012004><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=818302921-14012004><FONT face=Arial
color=#0000ff size=2>You can call Microsoft and volunteer to fix bugs for them
<g>!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=818302921-14012004><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=818302921-14012004><FONT face=Arial
color=#0000ff size=2>When I encounter the same problem (and I do) I simply
educate users on an appropriate viewer choice. In my case, I have users
who actually neither want nor need 24-bit images, but download them because they
think they'll look better than 8-bit images. Since the data in this case
is USGS topographic maps with 13 colors on them, 8-bit images are just
fine.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=818302921-14012004><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=818302921-14012004><FONT face=Arial
color=#0000ff size=2>I believe the problem is with multi-plane images.
Check the "Planar configuration:" from tiffinfo - the problems come up in
documents with "separate image planes" (3 8-bit planes) rather than "single
image plane" documents.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=818302921-14012004><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=818302921-14012004> <FONT
face=Arial color=#0000ff size=2>- Ed</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=818302921-14012004>
<P><FONT size=2>Ed McNierney<BR>President and Chief Mapmaker<BR>TopoZone.com /
Maps a la carte, Inc.<BR>73 Princeton Street, Suite 305<BR>North Chelmsford,
MA 01863<BR>ed@topozone.com<BR>(978) 251-4242 </FONT></P></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Brian Marchand [mailto:bmarchand@ara.com]
<BR><B>Sent:</B> Wednesday, January 14, 2004 4:13 PM<BR><B>To:</B>
gdal-dev@remotesensing.org<BR><B>Subject:</B> RE: [Gdal-dev] Creating a color
geotiff<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Ed,</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">You are absolutely
right. I read it using my GDAL based application and the images look fine. My
use for these images is mostly by my GDAL based application, so in that sense it
would be ok. However, users of this application may do what I did so I’d like to
figure out what’s wrong so the images can be viewed by the windows viewer too. I
can read another color geotiff (not created by me) with that viewer. That file
appears to be a 24 bit TIFF because it has 3 RGB bands of type Byte.
</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Brian</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Ed McNierney
[mailto:ed@topozone.com] <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B>
Wednesday, January 14, 2004 3:54 PM<BR><B><SPAN
style="FONT-WEIGHT: bold">To:</SPAN></B> gdal-dev@remotesensing.org<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [Gdal-dev] Creating a color
geotiff</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Brian
-</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Yes,
that's the one I'm talking about; in a prior life I was involved in creating
it! It was intended as a fax viewer, and does not properly handle many
24-bit TIFFs. They produce exactly the symptom you
describe.</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">It sounds
like your TIFF is correct - if you have Adobe Photoshop available, that's a much
more reliable color TIFF viewer, and I'll bet the image looks fine in it.
However, it's worth asking what you intend to do with these images, since they
need to be readable by whatever the target reader is.</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"> </SPAN></FONT><FONT
face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">- Ed</SPAN></FONT></P>
<P style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" size=2><SPAN
style="FONT-SIZE: 10pt">Ed McNierney<BR>President and Chief
Mapmaker<BR>TopoZone.com / Maps a la carte, Inc.<BR>73 Princeton Street, Suite
305<BR>North Chelmsford, MA 01863<BR>ed@topozone.com<BR>(978) 251-4242
</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=#0000ff
size=2><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<DIV class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-ALIGN: center"
align=center><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal
style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0in"><B><FONT
face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> Brian
Marchand [mailto:bmarchand@ara.com] <BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, January 14, 2004 3:45
PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
gdal-dev@remotesensing.org<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [Gdal-dev] Creating a color
geotiff</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Ed,</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I was
using a windows viewer by Kodak. With this viewer I was able to view other color
geotiff files successfully. The image appeared to repeat itself (in black and
white) with stripes of black interleaved.</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">When I use
the “create” function does the type need to match the type that I use for the
RasterIO function for a band? In this case both are set to GDT_Byte.
</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">For
instance I create the data set with;</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">GDALDataset* poDstDS =
poDriver->Create(destFile, sourceGrid.GetCols(), sourceGrid.GetRows(), 3,
GDT_Byte, NULL);</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">And write
bands with</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">poBandR->RasterIO(
GF_Write, 0, row, nXSize, 1, scanline, nXSize, 1, GDT_Byte, 0, 0
);</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">where
scanline is a char buffer of size nXSize. Or should I be using something like
GDT_Int32 for the data set type?</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Brian</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Ed McNierney
[mailto:ed@topozone.com] <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B>
Wednesday, January 14, 2004 3:21 PM<BR><B><SPAN
style="FONT-WEIGHT: bold">To:</SPAN></B> gdal-dev@remotesensing.org<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [Gdal-dev] Creating a color
geotiff</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Arial color=blue
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Brian
-</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Arial color=blue
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">How did
you conclude it was "garbage"? There are quite a few programs (such as the
Windows "Image and Fax Viewer") that don't read them correctly, or that fail to
read certain data organization/formats.</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"> </SPAN></FONT><FONT
face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">- Ed</SPAN></FONT></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Times New Roman" size=2><SPAN
style="FONT-SIZE: 10pt">Ed McNierney<BR>President and Chief
Mapmaker<BR>TopoZone.com / Maps a la carte, Inc.<BR>73 Princeton Street, Suite
305<BR>North Chelmsford, MA 01863<BR>ed@topozone.com<BR>(978) 251-4242
</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<DIV style="MARGIN-LEFT: 0.5in">
<DIV class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-ALIGN: center"
align=center><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV></DIV>
<P class=MsoNormal
style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 1in; MARGIN-RIGHT: 0in"><B><FONT
face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> Brian
Marchand [mailto:bmarchand@ara.com] <BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, January 14, 2004 3:10
PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
gdal-dev@remotesensing.org<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [Gdal-dev] Creating a color
geotiff</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hello,</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I’m trying to create geotiff files
for the first time and I was successful in creating a black and white geotiff.
So I moved on to creating a color one. I have a grid of RGB values so I created
a data set with 3 bands of type GDT_Byte. I used RasterIO to write out a
row at a time. The result was garbage. </SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Is there a specific order to writing
out bands? I first tried writing a row of red band, then a row of the green
band, then the row of the blue band. This didn’t work so I dried writing all of
rows for one band before writing the next. Am I way off on this? How should I be
doing this?</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks in advance,</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Brian Marchand</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman"
size=3><SPAN
style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV></BODY></HTML>