aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/Inventory
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Inventory')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
index 913eb0c..2dce706 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
@@ -2136,7 +2136,25 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2136 Stream tgadata = new MemoryStream(ic.Asset.Data); 2136 Stream tgadata = new MemoryStream(ic.Asset.Data);
2137 2137
2138 temp = LoadTGAClass.LoadTGA(tgadata); 2138 temp = LoadTGAClass.LoadTGA(tgadata);
2139 ic.Asset.Data = OpenJPEG.EncodeFromImage(temp, true); 2139 try
2140 {
2141 ic.Asset.Data = OpenJPEG.EncodeFromImage(temp, true);
2142 }
2143 catch (DllNotFoundException)
2144 {
2145 Rest.Log.ErrorFormat("OpenJpeg is not installed correctly on this system. Asset Data is emtpy for {0}", ic.Item.Name);
2146 ic.Asset.Data = new Byte[0];
2147 }
2148 catch (IndexOutOfRangeException)
2149 {
2150 Rest.Log.ErrorFormat("OpenJpeg was unable to encode this. Asset Data is emtpy for {0}", ic.Item.Name);
2151 ic.Asset.Data = new Byte[0];
2152 }
2153 catch (Exception)
2154 {
2155 Rest.Log.ErrorFormat("OpenJpeg was unable to encode this. Asset Data is emtpy for {0}", ic.Item.Name);
2156 ic.Asset.Data = new Byte[0];
2157 }
2140 } 2158 }
2141 2159
2142 ic.reset(); 2160 ic.reset();