aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Scripting
diff options
context:
space:
mode:
authorTeravus Ovares2009-01-21 11:16:33 +0000
committerTeravus Ovares2009-01-21 11:16:33 +0000
commit1a55dd11f1e0c17452c3264ff02496d8ced8a421 (patch)
treea358deb7a59b1a46075b1dc5adf7f359edb3151c /OpenSim/Region/Environment/Modules/Scripting
parent- remove extra "; in http_loginform.html.example; fix issue 3025 (diff)
downloadopensim-SC_OLD-1a55dd11f1e0c17452c3264ff02496d8ced8a421.zip
opensim-SC_OLD-1a55dd11f1e0c17452c3264ff02496d8ced8a421.tar.gz
opensim-SC_OLD-1a55dd11f1e0c17452c3264ff02496d8ced8a421.tar.bz2
opensim-SC_OLD-1a55dd11f1e0c17452c3264ff02496d8ced8a421.tar.xz
* More friendly OpenJpeg error handling.
* Often times now the only reason OpenJpeg doesn't work is because it requires Glibc 2.4 The error messages reflect that. * In J2kDecoder module, It stops trying to decode modules if it encounters a dllnotfound exception and instead sends a full resolution layer that causes the texture sender to only send the full resolution image. (big decrease in texture download speed, but it's better then nasty repeating error messages)
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Scripting')
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs14
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs12
3 files changed, 35 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
index 59d29d6..e9fe373 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -275,7 +275,19 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
275 275
276 Bitmap joint = MergeBitMaps(image1, image2); 276 Bitmap joint = MergeBitMaps(image1, image2);
277 277
278 return OpenJPEG.EncodeFromImage(joint, true); 278 byte[] result = new byte[0];
279
280 try
281 {
282 result = OpenJPEG.EncodeFromImage(joint, true);
283 }
284 catch (Exception)
285 {
286 Console.WriteLine(
287 "[DYNAMICTEXTUREMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
288 }
289
290 return result;
279 } 291 }
280 } 292 }
281 293
diff --git a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
index 631051b..eeeb3ca 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -168,7 +168,17 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
168 } 168 }
169 169
170 Bitmap resize = new Bitmap(image, newsize); 170 Bitmap resize = new Bitmap(image, newsize);
171 byte[] imageJ2000 = OpenJPEG.EncodeFromImage(resize, true); 171 byte[] imageJ2000 = new byte[0];
172
173 try
174 {
175 imageJ2000 = OpenJPEG.EncodeFromImage(resize, true);
176 }
177 catch (Exception)
178 {
179 Console.WriteLine(
180 "[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
181 }
172 182
173 m_textureManager.ReturnData(state.RequestID, imageJ2000); 183 m_textureManager.ReturnData(state.RequestID, imageJ2000);
174 } 184 }
diff --git a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
index f8a9879..ffbc262 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
@@ -169,7 +169,17 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
169 169
170 GDIDraw(data, graph); 170 GDIDraw(data, graph);
171 171
172 byte[] imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, true); 172 byte[] imageJ2000 = new byte[0];
173
174 try
175 {
176 imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, true);
177 }
178 catch (Exception)
179 {
180 Console.WriteLine(
181 "[VECTORRENDERMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
182 }
173 m_textureManager.ReturnData(id, imageJ2000); 183 m_textureManager.ReturnData(id, imageJ2000);
174 } 184 }
175 185