diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Terrain/FileLoaders/BMP.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/BMP.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/BMP.cs index fb57c82..ec2d085 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/BMP.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/BMP.cs | |||
@@ -47,9 +47,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
47 | /// <param name="map">The terrain channel being saved</param> | 47 | /// <param name="map">The terrain channel being saved</param> |
48 | public override void SaveFile(string filename, ITerrainChannel map) | 48 | public override void SaveFile(string filename, ITerrainChannel map) |
49 | { | 49 | { |
50 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); | 50 | using(Bitmap colours = CreateGrayscaleBitmapFromMap(map)) |
51 | 51 | colours.Save(filename,ImageFormat.Bmp); | |
52 | colours.Save(filename, ImageFormat.Bmp); | ||
53 | } | 52 | } |
54 | 53 | ||
55 | /// <summary> | 54 | /// <summary> |
@@ -59,9 +58,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
59 | /// <param name="map">The terrain channel being saved</param> | 58 | /// <param name="map">The terrain channel being saved</param> |
60 | public override void SaveStream(Stream stream, ITerrainChannel map) | 59 | public override void SaveStream(Stream stream, ITerrainChannel map) |
61 | { | 60 | { |
62 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); | 61 | using(Bitmap colours = CreateGrayscaleBitmapFromMap(map)) |
63 | 62 | colours.Save(stream,ImageFormat.Bmp); | |
64 | colours.Save(stream, ImageFormat.Png); | ||
65 | } | 63 | } |
66 | 64 | ||
67 | /// <summary> | 65 | /// <summary> |