aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDr Scofield2008-08-06 15:20:45 +0000
committerDr Scofield2008-08-06 15:20:45 +0000
commitae13fec6553b00345666593f85e32d332cfed20d (patch)
tree0056e4528537c4c7ea4c2a80d3a911ee4d36bb01
parentFrom: alan webb <alan_webb@us.ibm.com> (diff)
downloadopensim-SC-ae13fec6553b00345666593f85e32d332cfed20d.zip
opensim-SC-ae13fec6553b00345666593f85e32d332cfed20d.tar.gz
opensim-SC-ae13fec6553b00345666593f85e32d332cfed20d.tar.bz2
opensim-SC-ae13fec6553b00345666593f85e32d332cfed20d.tar.xz
From: alan webb <alan_webb@us.ibm.com>
this adds image conversion features to the REST inventory/asset code.
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs8
-rw-r--r--prebuild.xml1
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;
31using System.IO; 31using System.IO;
32using System.Threading; 32using System.Threading;
33using System.Xml; 33using System.Xml;
34using System.Drawing;
34using OpenJPEGNet; 35using OpenJPEGNet;
35using OpenSim.Framework; 36using OpenSim.Framework;
36using OpenSim.Framework.Servers; 37using 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" />