MapWinGIS:Image Various Properties

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy

Various Properties (Non-Bitmap images only)

Description: Shows the results of setting various image properties. These properties are ignored by bitmap (bmp) images.


C# Usage

 int hndl;
 bool res;
 MapWinGIS.Image img = new MapWinGIS.ImageClass();
 openFileDialog1.ShowDialog();
 res = img.Open(openFileDialog1.FileName.ToString(), MapWinGIS.ImageType.USE_FILE_EXTENSION, false, null);
 if (!res)
   MessageBox.Show(img.get_ErrorMsg(img.LastErrorCode));
 hndl = axMap1.AddLayer(img, true);
 axMap1.ZoomToMaxVisibleExtents();
 axMap1.Redraw();
 MessageBox.Show("Default");


Default View













 img.ImageColorScheme = MapWinGIS.PredefinedColorScheme.SummerMountains;
 axMap1.Redraw();
 MessageBox.Show("ImageColorScheme = SummerMountains");
PredefinedColorScheme = SummerMountains














 img.BufferSize = 30;
 axMap1.Redraw();
 MessageBox.Show("Buffersize = 30");
BufferSize=30. Reducing the buffer size may improve loading speed but will reduce image quality















 img.BufferSize = 100;
 img.SetToGrey = true;
 axMap1.Redraw();
 MessageBox.Show("SetToGrey = true");
SetToGrey = true













 img.SetToGrey = false;
 img.AllowHillshade = false;
 axMap1.Redraw();
 MessageBox.Show("AllowHillshade = false");
AllowHillshade = false. Prevents the image from being hilshaded as a DEM grid















 img.UseHistogram = true;
 axMap1.Redraw();
 MessageBox.Show("UseHistogram = true");
UseHistogram = true. Will compute histogram equalization (greyscale images only)















 img.UseHistogram = false;
 img.AllowHillshade = true;
 img.ImageColorScheme = MapWinGIS.PredefinedColorScheme.Highway1;
 axMap1.set_ImageLayerPercentTransparent(hndl,(float)0.80);
 MessageBox.Show("ImageLayerPercentTransparent = 0.80");
 axMap1.Redraw();
ImageLayerPercentTransparent = 0.80. Dots the image with nodata values to create a crude transparency. Note that the image sampling will be inefficient when transparency is set > 0



















Back to MapWinGIS.Image

Retrieved from "http://mapwindow.org/wiki/index.php/MapWinGIS:Image_Various_Properties"

This page has been accessed 1,060 times. This page was last modified on 19 September 2009, at 17:35.