concerns GenericSystemDrawing.cs
in OpenSim\Region\CoreModules\World\Terrain\FileLoaders\GenericSystemDrawing.cs Ln 67 Apply Justin's solution Signed-off-by: Garmin Kawaguichi <garmin.kawaguichi@magalaxie.com>0.7.4.1
parent
f3dda2d85d
commit
63cda3a6d0
|
@ -64,7 +64,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
|
|||
|
||||
public virtual ITerrainChannel LoadFile(string filename, int offsetX, int offsetY, int fileWidth, int fileHeight, int w, int h)
|
||||
{
|
||||
Bitmap bitmap = new Bitmap(filename);
|
||||
using (Bitmap bitmap = new Bitmap(filename))
|
||||
{
|
||||
ITerrainChannel retval = new TerrainChannel(true);
|
||||
|
||||
for (int x = 0; x < retval.Width; x++)
|
||||
|
@ -74,9 +75,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
|
|||
retval[x, y] = bitmap.GetPixel(offsetX * retval.Width + x, (bitmap.Height - (retval.Height * (offsetY + 1))) + retval.Height - y - 1).GetBrightness() * 128;
|
||||
}
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual ITerrainChannel LoadStream(Stream stream)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue