diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs index e7927464b3..4f18d00107 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 newSize.Height = 1024; } - using(Bitmap resize = new Bitmap(image, newSize)) + if(newSize.Width != image.Width || newSize.Height != image.Height) { - imageJ2000 = OpenJPEG.EncodeFromImage(resize, false); + using(Bitmap resize = new Bitmap(image, newSize)) + imageJ2000 = OpenJPEG.EncodeFromImage(resize, false); } + else + imageJ2000 = OpenJPEG.EncodeFromImage(image, false); } } catch (Exception)