diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs index c0b276a..e8c719a 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs | |||
@@ -213,8 +213,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
213 | /// <returns>A System.Drawing.Bitmap containing a grayscale image</returns> | 213 | /// <returns>A System.Drawing.Bitmap containing a grayscale image</returns> |
214 | protected static Bitmap CreateGrayscaleBitmapFromMap(ITerrainChannel map) | 214 | protected static Bitmap CreateGrayscaleBitmapFromMap(ITerrainChannel map) |
215 | { | 215 | { |
216 | // Bitmap bmp = new Bitmap(map.Width, map.Height, PixelFormat.Format24bppRgb); | ||
216 | Bitmap bmp = new Bitmap(map.Width, map.Height); | 217 | Bitmap bmp = new Bitmap(map.Width, map.Height); |
217 | 218 | ||
219 | |||
218 | const int pallete = 256; | 220 | const int pallete = 256; |
219 | 221 | ||
220 | Color[] grays = new Color[pallete]; | 222 | Color[] grays = new Color[pallete]; |
@@ -227,9 +229,12 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
227 | { | 229 | { |
228 | for (int x = 0; x < map.Width; x++) | 230 | for (int x = 0; x < map.Width; x++) |
229 | { | 231 | { |
230 | int colorindex = (int)map[x, y]; // one to one conversion as seems apparent on sl docs | 232 | // to change this, loading also needs change |
231 | // or 0-511 range? | 233 | |
232 | // int colorindex = (int)map[x, y]/2; // 0-511 | 234 | // int colorindex = (int)map[x, y]; // one to one conversion 0 - 255m range |
235 | // int colorindex = (int)map[x, y] / 2; // 0 - 510 range | ||
236 | |||
237 | int colorindex = (int)map[x, y] * 2; // the original 0 - 127.5 range | ||
233 | 238 | ||
234 | // clamp it not adding the red warning | 239 | // clamp it not adding the red warning |
235 | if (colorindex < 0) | 240 | if (colorindex < 0) |