aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World
diff options
context:
space:
mode:
authorTeravus Ovares2009-01-21 11:16:33 +0000
committerTeravus Ovares2009-01-21 11:16:33 +0000
commit1a55dd11f1e0c17452c3264ff02496d8ced8a421 (patch)
treea358deb7a59b1a46075b1dc5adf7f359edb3151c /OpenSim/Region/Environment/Modules/World
parent- remove extra "; in http_loginform.html.example; fix issue 3025 (diff)
downloadopensim-SC-1a55dd11f1e0c17452c3264ff02496d8ced8a421.zip
opensim-SC-1a55dd11f1e0c17452c3264ff02496d8ced8a421.tar.gz
opensim-SC-1a55dd11f1e0c17452c3264ff02496d8ced8a421.tar.bz2
opensim-SC-1a55dd11f1e0c17452c3264ff02496d8ced8a421.tar.xz
* 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)
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World')
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs29
1 files changed, 25 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs
index c5efb4f..d66bbdb 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs
@@ -170,10 +170,31 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
170 170
171 ManagedImage managedImage; 171 ManagedImage managedImage;
172 Image image; 172 Image image;
173 if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image)) 173
174 return new Bitmap(image); 174 try
175 else 175 {
176 return null; 176 if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image))
177 return new Bitmap(image);
178 else
179 return null;
180 }
181 catch (DllNotFoundException)
182 {
183 m_log.ErrorFormat("[TexturedMapTileRenderer]: OpenJpeg is not installed correctly on this system. Asset Data is emtpy for {0}", id);
184
185 }
186 catch (IndexOutOfRangeException)
187 {
188 m_log.ErrorFormat("[TexturedMapTileRenderer]: OpenJpeg was unable to encode this. Asset Data is emtpy for {0}", id);
189
190 }
191 catch (Exception)
192 {
193 m_log.ErrorFormat("[TexturedMapTileRenderer]: OpenJpeg was unable to encode this. Asset Data is emtpy for {0}", id);
194
195 }
196 return null;
197
177 } 198 }
178 199
179 // Compute the average color of a texture. 200 // Compute the average color of a texture.