aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Client
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Client')
-rw-r--r--OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
index 8c9eb5f..c649c5a 100644
--- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
+++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
@@ -95,16 +95,15 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
95 95
96 ManagedImage tmp; 96 ManagedImage tmp;
97 Image imgData; 97 Image imgData;
98 byte[] jpegdata;
98 99
99 OpenJPEG.DecodeToImage(asset.Data, out tmp, out imgData); 100 OpenJPEG.DecodeToImage(asset.Data, out tmp, out imgData);
100
101 MemoryStream ms = new MemoryStream();
102 101
103 imgData.Save(ms, ImageFormat.Jpeg); 102 using (MemoryStream ms = new MemoryStream())
104 103 {
105 byte[] jpegdata = ms.GetBuffer(); 104 imgData.Save(ms, ImageFormat.Jpeg);
106 105 jpegdata = ms.GetBuffer();
107 ms.Close(); 106 }
108 107
109 resp.ContentType = "image/jpeg"; 108 resp.ContentType = "image/jpeg";
110 resp.ContentLength = jpegdata.Length; 109 resp.ContentLength = jpegdata.Length;