diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs index 98d69a5..34bbf78 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs | |||
@@ -24,8 +24,10 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | |||
27 | using System.Drawing; | 28 | using System.Drawing; |
28 | using System.Drawing.Imaging; | 29 | using System.Drawing.Imaging; |
30 | using System.IO; | ||
29 | using OpenSim.Region.Environment.Interfaces; | 31 | using OpenSim.Region.Environment.Interfaces; |
30 | 32 | ||
31 | namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | 33 | namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders |
@@ -49,6 +51,18 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
49 | 51 | ||
50 | colours.Save(filename, ImageFormat.Bmp); | 52 | colours.Save(filename, ImageFormat.Bmp); |
51 | } | 53 | } |
54 | |||
55 | /// <summary> | ||
56 | /// Exports a stream using a System.Drawing exporter. | ||
57 | /// </summary> | ||
58 | /// <param name="stream">The target stream</param> | ||
59 | /// <param name="map">The terrain channel being saved</param> | ||
60 | public override void SaveStream(Stream stream, ITerrainChannel map) | ||
61 | { | ||
62 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); | ||
63 | |||
64 | colours.Save(stream, ImageFormat.Png); | ||
65 | } | ||
52 | 66 | ||
53 | /// <summary> | 67 | /// <summary> |
54 | /// The human readable version of the file format(s) this loader handles | 68 | /// The human readable version of the file format(s) this loader handles |