aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest
diff options
context:
space:
mode:
authorDr Scofield2008-08-06 15:20:45 +0000
committerDr Scofield2008-08-06 15:20:45 +0000
commitae13fec6553b00345666593f85e32d332cfed20d (patch)
tree0056e4528537c4c7ea4c2a80d3a911ee4d36bb01 /OpenSim/ApplicationPlugins/Rest
parentFrom: alan webb <alan_webb@us.ibm.com> (diff)
downloadopensim-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.
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs8
1 files changed, 6 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();