diff options
author | Melanie | 2009-10-05 10:17:23 +0100 |
---|---|---|
committer | Melanie | 2009-10-05 10:17:23 +0100 |
commit | 0744292b479446eb1ebec828afafacc0189709ca (patch) | |
tree | 3c43b5f425aff61d3625b75b7aef35ce5062ae56 /OpenSim/Client/VWoHTTP/ClientStack | |
parent | Merge branch 'master' into vehicles (diff) | |
parent | Make the asset connector async Get overload return false if the asset (diff) | |
download | opensim-SC_OLD-0744292b479446eb1ebec828afafacc0189709ca.zip opensim-SC_OLD-0744292b479446eb1ebec828afafacc0189709ca.tar.gz opensim-SC_OLD-0744292b479446eb1ebec828afafacc0189709ca.tar.bz2 opensim-SC_OLD-0744292b479446eb1ebec828afafacc0189709ca.tar.xz |
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Client/VWoHTTP/ClientStack')
-rw-r--r-- | OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs | 13 |
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; |