Merge branch 'master' of /var/git/opensim/
commit
f7b05a5760
|
@ -175,6 +175,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
{
|
{
|
||||||
stream = response.GetResponseStream();
|
stream = response.GetResponseStream();
|
||||||
if (stream != null)
|
if (stream != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
Bitmap image = new Bitmap(stream);
|
Bitmap image = new Bitmap(stream);
|
||||||
Size newsize;
|
Size newsize;
|
||||||
|
@ -207,13 +209,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
|
|
||||||
Bitmap resize = new Bitmap(image, newsize);
|
Bitmap resize = new Bitmap(image, newsize);
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
imageJ2000 = OpenJPEG.EncodeFromImage(resize, true);
|
imageJ2000 = OpenJPEG.EncodeFromImage(resize, true);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
|
m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Conversion Failed. Empty byte data returned!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue