diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs | 8 |
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; | |||
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(); |