diff options
author | Dr Scofield | 2008-08-06 15:20:45 +0000 |
---|---|---|
committer | Dr Scofield | 2008-08-06 15:20:45 +0000 |
commit | ae13fec6553b00345666593f85e32d332cfed20d (patch) | |
tree | 0056e4528537c4c7ea4c2a80d3a911ee4d36bb01 | |
parent | From: alan webb <alan_webb@us.ibm.com> (diff) | |
download | opensim-SC_OLD-ae13fec6553b00345666593f85e32d332cfed20d.zip opensim-SC_OLD-ae13fec6553b00345666593f85e32d332cfed20d.tar.gz opensim-SC_OLD-ae13fec6553b00345666593f85e32d332cfed20d.tar.bz2 opensim-SC_OLD-ae13fec6553b00345666593f85e32d332cfed20d.tar.xz |
From: alan webb <alan_webb@us.ibm.com>
this adds image conversion features to the REST inventory/asset code.
-rw-r--r-- | OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs | 8 | ||||
-rw-r--r-- | prebuild.xml | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs index 5de2cb4..61c3ac4 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs | |||
@@ -31,6 +31,7 @@ using System.Collections.Generic; | |||
31 | using System.IO; | 31 | using System.IO; |
32 | using System.Threading; | 32 | using System.Threading; |
33 | using System.Xml; | 33 | using System.Xml; |
34 | using System.Drawing; | ||
34 | using OpenJPEGNet; | 35 | using OpenJPEGNet; |
35 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
36 | using OpenSim.Framework.Servers; | 37 | using OpenSim.Framework.Servers; |
@@ -1931,8 +1932,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
1931 | if (ic.Item.AssetType == (int) AssetType.TextureTGA || | 1932 | if (ic.Item.AssetType == (int) AssetType.TextureTGA || |
1932 | ic.Item.AssetType == (int) AssetType.ImageTGA) | 1933 | ic.Item.AssetType == (int) AssetType.ImageTGA) |
1933 | { | 1934 | { |
1934 | // TODO: DO we need to convert it? Or is it enough to flag | 1935 | Bitmap temp; |
1935 | // it appropriately? | 1936 | Stream tgadata = new MemoryStream(ic.Asset.Data); |
1937 | |||
1938 | temp = OpenJPEGNet.LoadTGAClass.LoadTGA(tgadata); | ||
1939 | ic.Asset.Data = OpenJPEGNet.OpenJPEG.EncodeFromImage(temp, true); | ||
1936 | } | 1940 | } |
1937 | 1941 | ||
1938 | ic.reset(); | 1942 | ic.reset(); |
diff --git a/prebuild.xml b/prebuild.xml index 4cd6207..c460ae8 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -1255,6 +1255,7 @@ | |||
1255 | <Reference name="Mono.Addins.dll" /> | 1255 | <Reference name="Mono.Addins.dll" /> |
1256 | <Reference name="System"/> | 1256 | <Reference name="System"/> |
1257 | <Reference name="System.Xml"/> | 1257 | <Reference name="System.Xml"/> |
1258 | <Reference name="System.Drawing"/> | ||
1258 | <Reference name="libsecondlife.dll" /> | 1259 | <Reference name="libsecondlife.dll" /> |
1259 | <Reference name="Nini.dll" /> | 1260 | <Reference name="Nini.dll" /> |
1260 | <Reference name="XMLRPC.dll" /> | 1261 | <Reference name="XMLRPC.dll" /> |