private void frmMain_Load(object sender, EventArgs e) { wfMap.MapUnit = GeographyUnit.DecimalDegree; AddRasterLayer(); } void AddRasterLayer() { GdiPlusRasterLayer gdiPlusRasterLayer = new GdiPlusRasterLayer(); gdiPlusRasterLayer.StreamLoading += new EventHandler(a_StreamLoading); LayerOverlay ov = new LayerOverlay(); ov.Layers.Add(gdiPlusRasterLayer); wfMap.Overlays.Add(ov); wfMap.Refresh(); } void a_StreamLoading(object sender, StreamLoadingEventArgs e) { if (e.StreamType == "Image File") { Bitmap bitmap = new Bitmap(@"World.tif"); bitmap.RotateFlip(RotateFlipType.Rotate90FlipNone); MemoryStream memoryStream = new MemoryStream(); bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Tiff); e.AlternateStream = memoryStream; } if (e.StreamType == "World File") { Stream stream = new FileStream(@"World.tfw", FileMode.Open, FileAccess.Read); e.AlternateStream = stream; } }