diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Terrain/FileLoaders/PNG.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Terrain/FileLoaders/PNG.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/PNG.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/PNG.cs index c5c12ae..8ea8e9d 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/PNG.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/PNG.cs | |||
@@ -36,9 +36,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
36 | { | 36 | { |
37 | public override void SaveFile(string filename, ITerrainChannel map) | 37 | public override void SaveFile(string filename, ITerrainChannel map) |
38 | { | 38 | { |
39 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); | 39 | using(Bitmap colours = CreateGrayscaleBitmapFromMap(map)) |
40 | 40 | colours.Save(filename,ImageFormat.Png); | |
41 | colours.Save(filename, ImageFormat.Png); | ||
42 | } | 41 | } |
43 | 42 | ||
44 | /// <summary> | 43 | /// <summary> |
@@ -48,9 +47,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
48 | /// <param name="map">The terrain channel being saved</param> | 47 | /// <param name="map">The terrain channel being saved</param> |
49 | public override void SaveStream(Stream stream, ITerrainChannel map) | 48 | public override void SaveStream(Stream stream, ITerrainChannel map) |
50 | { | 49 | { |
51 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); | 50 | using(Bitmap colours = CreateGrayscaleBitmapFromMap(map)) |
52 | 51 | colours.Save(stream,ImageFormat.Png); | |
53 | colours.Save(stream, ImageFormat.Png); | ||
54 | } | 52 | } |
55 | 53 | ||
56 | public override string ToString() | 54 | public override string ToString() |