diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Terrain')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Terrain/FileLoaders/JPEG.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/FileLoaders/JPEG.cs b/OpenSim/Region/Environment/Modules/Terrain/FileLoaders/JPEG.cs index 57e6cd8..20e5277 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/FileLoaders/JPEG.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/FileLoaders/JPEG.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.FileLoaders | |||
47 | 47 | ||
48 | int pallete = gradientmapLd.Height; | 48 | int pallete = gradientmapLd.Height; |
49 | 49 | ||
50 | Bitmap bmp = new Bitmap(heightmap.w, heightmap.h); | 50 | Bitmap bmp = new Bitmap(map.Width, map.Height); |
51 | Color[] colours = new Color[pallete]; | 51 | Color[] colours = new Color[pallete]; |
52 | 52 | ||
53 | for (int i = 0; i < pallete; i++) | 53 | for (int i = 0; i < pallete; i++) |
@@ -55,9 +55,9 @@ namespace OpenSim.Region.Environment.Modules.Terrain.FileLoaders | |||
55 | colours[i] = gradientmapLd.GetPixel(0, i); | 55 | colours[i] = gradientmapLd.GetPixel(0, i); |
56 | } | 56 | } |
57 | 57 | ||
58 | for (int y = 0; y < copy.h; y++) | 58 | for (int y = 0; y < map.Height; y++) |
59 | { | 59 | { |
60 | for (int x = 0; x < copy.w; x++) | 60 | for (int x = 0; x < map.Width; x++) |
61 | { | 61 | { |
62 | // 512 is the largest possible height before colours clamp | 62 | // 512 is the largest possible height before colours clamp |
63 | int colorindex = (int)(Math.Max(Math.Min(1.0, map[x, y] / 512.0), 0.0) * (pallete - 1)); | 63 | int colorindex = (int)(Math.Max(Math.Min(1.0, map[x, y] / 512.0), 0.0) * (pallete - 1)); |