mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
* 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)
This commit is contained in:
@@ -170,10 +170,31 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||
|
||||
ManagedImage managedImage;
|
||||
Image image;
|
||||
if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image))
|
||||
return new Bitmap(image);
|
||||
else
|
||||
return null;
|
||||
|
||||
try
|
||||
{
|
||||
if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image))
|
||||
return new Bitmap(image);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
catch (DllNotFoundException)
|
||||
{
|
||||
m_log.ErrorFormat("[TexturedMapTileRenderer]: OpenJpeg is not installed correctly on this system. Asset Data is emtpy for {0}", id);
|
||||
|
||||
}
|
||||
catch (IndexOutOfRangeException)
|
||||
{
|
||||
m_log.ErrorFormat("[TexturedMapTileRenderer]: OpenJpeg was unable to encode this. Asset Data is emtpy for {0}", id);
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
m_log.ErrorFormat("[TexturedMapTileRenderer]: OpenJpeg was unable to encode this. Asset Data is emtpy for {0}", id);
|
||||
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
// Compute the average color of a texture.
|
||||
|
||||
Reference in New Issue
Block a user