From 38568aa75f3592989f22fd7bee9a26455c82f76e Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Mon, 3 Mar 2008 09:17:15 +0000 Subject: * Oops, fixed. --- OpenSim/Region/Environment/Modules/Terrain/FileLoaders/JPEG.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/Terrain') 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 int pallete = gradientmapLd.Height; - Bitmap bmp = new Bitmap(heightmap.w, heightmap.h); + Bitmap bmp = new Bitmap(map.Width, map.Height); Color[] colours = new Color[pallete]; for (int i = 0; i < pallete; i++) @@ -55,9 +55,9 @@ namespace OpenSim.Region.Environment.Modules.Terrain.FileLoaders colours[i] = gradientmapLd.GetPixel(0, i); } - for (int y = 0; y < copy.h; y++) + for (int y = 0; y < map.Height; y++) { - for (int x = 0; x < copy.w; x++) + for (int x = 0; x < map.Width; x++) { // 512 is the largest possible height before colours clamp int colorindex = (int)(Math.Max(Math.Min(1.0, map[x, y] / 512.0), 0.0) * (pallete - 1)); -- cgit v1.1