diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs index 628c201..9886b81 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Drawing; | 29 | using System.Drawing; |
30 | using System.Drawing.Imaging; | 30 | using System.Drawing.Imaging; |
31 | using System.IO; | ||
31 | using OpenSim.Region.Environment.Interfaces; | 32 | using OpenSim.Region.Environment.Interfaces; |
32 | 33 | ||
33 | namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | 34 | namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders |
@@ -50,6 +51,11 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
50 | { | 51 | { |
51 | throw new NotImplementedException(); | 52 | throw new NotImplementedException(); |
52 | } | 53 | } |
54 | |||
55 | public ITerrainChannel LoadStream(Stream stream) | ||
56 | { | ||
57 | throw new NotImplementedException(); | ||
58 | } | ||
53 | 59 | ||
54 | public void SaveFile(string filename, ITerrainChannel map) | 60 | public void SaveFile(string filename, ITerrainChannel map) |
55 | { | 61 | { |
@@ -57,6 +63,18 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
57 | 63 | ||
58 | colours.Save(filename, ImageFormat.Jpeg); | 64 | colours.Save(filename, ImageFormat.Jpeg); |
59 | } | 65 | } |
66 | |||
67 | /// <summary> | ||
68 | /// Exports a stream using a System.Drawing exporter. | ||
69 | /// </summary> | ||
70 | /// <param name="stream">The target stream</param> | ||
71 | /// <param name="map">The terrain channel being saved</param> | ||
72 | public void SaveStream(Stream stream, ITerrainChannel map) | ||
73 | { | ||
74 | Bitmap colours = CreateBitmapFromMap(map); | ||
75 | |||
76 | colours.Save(stream, ImageFormat.Jpeg); | ||
77 | } | ||
60 | 78 | ||
61 | #endregion | 79 | #endregion |
62 | 80 | ||