From 752b6a876498a7a7b80e6892088d5015c340c13a Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 6 Oct 2010 03:40:55 +0100 Subject: Convert the BMP to a JPEG image and return it. This should be testable. --- OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/World') diff --git a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs index a2e47c3..bcf4187 100644 --- a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs +++ b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs @@ -28,7 +28,9 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.Drawing.Imaging; using System.Reflection; +using System.IO; using log4net; using Nini.Config; using OpenMetaverse; @@ -109,7 +111,11 @@ namespace OpenSim.Region.OptionalModules.World.WorldView Bitmap bmp = m_Generator.CreateViewImage(pos, rot, fov, width, height); - return new Byte[0]; + MemoryStream str = new MemoryStream(); + + bmp.Save(str, ImageFormat.Jpeg); + + return str.ToArray(); } } } -- cgit v1.1