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,18 +64,19 @@ 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);
|
||||
ITerrainChannel retval = new TerrainChannel(true);
|
||||
|
||||
for (int x = 0; x < retval.Width; x++)
|
||||
using (Bitmap bitmap = new Bitmap(filename))
|
||||
{
|
||||
for (int y = 0; y < retval.Height; y++)
|
||||
{
|
||||
retval[x, y] = bitmap.GetPixel(offsetX * retval.Width + x, (bitmap.Height - (retval.Height * (offsetY + 1))) + retval.Height - y - 1).GetBrightness() * 128;
|
||||
}
|
||||
}
|
||||
ITerrainChannel retval = new TerrainChannel(true);
|
||||
|
||||
return retval;
|
||||
for (int x = 0; x < retval.Width; x++)
|
||||
{
|
||||
for (int y = 0; y < retval.Height; y++)
|
||||
{
|
||||
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