diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs index 9730b16..484bb89 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs | |||
@@ -61,9 +61,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
61 | 61 | ||
62 | ITerrainChannel retval = new TerrainChannel(file.Width, file.Height); | 62 | ITerrainChannel retval = new TerrainChannel(file.Width, file.Height); |
63 | 63 | ||
64 | int x, y; | 64 | int x; |
65 | for (x = 0; x < file.Width; x++) | 65 | for (x = 0; x < file.Width; x++) |
66 | { | 66 | { |
67 | int y; | ||
67 | for (y = 0; y < file.Height; y++) | 68 | for (y = 0; y < file.Height; y++) |
68 | { | 69 | { |
69 | retval[x, y] = file.GetPixel(x, y).GetBrightness() * 128; | 70 | retval[x, y] = file.GetPixel(x, y).GetBrightness() * 128; |
@@ -103,11 +104,11 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
103 | /// </summary> | 104 | /// </summary> |
104 | /// <param name="map">The terrain channel to export to bitmap</param> | 105 | /// <param name="map">The terrain channel to export to bitmap</param> |
105 | /// <returns>A System.Drawing.Bitmap containing a grayscale image</returns> | 106 | /// <returns>A System.Drawing.Bitmap containing a grayscale image</returns> |
106 | protected Bitmap CreateGrayscaleBitmapFromMap(ITerrainChannel map) | 107 | protected static Bitmap CreateGrayscaleBitmapFromMap(ITerrainChannel map) |
107 | { | 108 | { |
108 | Bitmap bmp = new Bitmap(map.Width, map.Height); | 109 | Bitmap bmp = new Bitmap(map.Width, map.Height); |
109 | 110 | ||
110 | int pallete = 256; | 111 | const int pallete = 256; |
111 | 112 | ||
112 | Color[] grays = new Color[pallete]; | 113 | Color[] grays = new Color[pallete]; |
113 | for (int i = 0; i < grays.Length; i++) | 114 | for (int i = 0; i < grays.Length; i++) |
@@ -138,7 +139,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
138 | /// </summary> | 139 | /// </summary> |
139 | /// <param name="map">The terrain channel to export to bitmap</param> | 140 | /// <param name="map">The terrain channel to export to bitmap</param> |
140 | /// <returns>A System.Drawing.Bitmap containing a coloured image</returns> | 141 | /// <returns>A System.Drawing.Bitmap containing a coloured image</returns> |
141 | protected Bitmap CreateBitmapFromMap(ITerrainChannel map) | 142 | protected static Bitmap CreateBitmapFromMap(ITerrainChannel map) |
142 | { | 143 | { |
143 | Bitmap gradientmapLd = new Bitmap("defaultstripe.png"); | 144 | Bitmap gradientmapLd = new Bitmap("defaultstripe.png"); |
144 | 145 | ||