aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs12
1 files changed, 11 insertions, 1 deletions
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 }