diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs index c081aea..3f98f40 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.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 |
@@ -38,6 +40,18 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
38 | 40 | ||
39 | colours.Save(filename, ImageFormat.Tiff); | 41 | colours.Save(filename, ImageFormat.Tiff); |
40 | } | 42 | } |
43 | |||
44 | /// <summary> | ||
45 | /// Exports a stream using a System.Drawing exporter. | ||
46 | /// </summary> | ||
47 | /// <param name="stream">The target stream</param> | ||
48 | /// <param name="map">The terrain channel being saved</param> | ||
49 | public override void SaveStream(Stream stream, ITerrainChannel map) | ||
50 | { | ||
51 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); | ||
52 | |||
53 | colours.Save(stream, ImageFormat.Tiff); | ||
54 | } | ||
41 | 55 | ||
42 | public override string ToString() | 56 | public override string ToString() |
43 | { | 57 | { |