Hi,
I want to draw a GeoTiff image on my map, I use the GeoTiffRasterLayer class to open a GeoTIFF image.
the GeoTiff image that display on my map is a gray image. But my GeoTiff image is a 24bit colour image.
How can I display a GeoTiff imageon as a 24bit colour image on my map.would you please help me?
thank you very much?
The following is my code:
winformsMap1.MapUnit = GeographyUnit.Meter;
winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);
GeoTiffRasterLayer Layera = new GeoTiffRasterLayer(@"C:\OSGeo4W\apache\htdocs\images\tile_2_2.tif");
Layera.UpperThreshold = double.MaxValue;
Layera.LowerThreshold = 0;
Layera.IsGrayscale = true;
LayerOverlay ImageOverlay = new LayerOverlay();
ImageOverlay.Layers.Add("WorldImageLayer", Layera);
winformsMap1.Overlays.Add(ImageOverlay);
Layera.Open();
winformsMap1.CurrentExtent = Layera.GetBoundingBox();
Layera.Close();
winformsMap1.Refresh();