From 1a55dd11f1e0c17452c3264ff02496d8ced8a421 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 21 Jan 2009 11:16:33 +0000 Subject: * 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) --- .../Modules/Scripting/LoadImageURL/LoadImageURLModule.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs') 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 } Bitmap resize = new Bitmap(image, newsize); - byte[] imageJ2000 = OpenJPEG.EncodeFromImage(resize, true); + byte[] imageJ2000 = new byte[0]; + + try + { + imageJ2000 = OpenJPEG.EncodeFromImage(resize, true); + } + catch (Exception) + { + Console.WriteLine( + "[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); + } m_textureManager.ReturnData(state.RequestID, imageJ2000); } -- cgit v1.1