aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
index e792746..4f18d00 100644
--- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -249,10 +249,13 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
249 newSize.Height = 1024; 249 newSize.Height = 1024;
250 } 250 }
251 251
252 using(Bitmap resize = new Bitmap(image, newSize)) 252 if(newSize.Width != image.Width || newSize.Height != image.Height)
253 { 253 {
254 imageJ2000 = OpenJPEG.EncodeFromImage(resize, false); 254 using(Bitmap resize = new Bitmap(image, newSize))
255 imageJ2000 = OpenJPEG.EncodeFromImage(resize, false);
255 } 256 }
257 else
258 imageJ2000 = OpenJPEG.EncodeFromImage(image, false);
256 } 259 }
257 } 260 }
258 catch (Exception) 261 catch (Exception)