diff options
Diffstat (limited to 'OpenSim/Capabilities')
-rw-r--r-- | OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | 5 | ||||
-rw-r--r-- | OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs | 6 |
2 files changed, 0 insertions, 11 deletions
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index 062a842..e73cf9e 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs | |||
@@ -362,8 +362,6 @@ namespace OpenSim.Capabilities.Handlers | |||
362 | { | 362 | { |
363 | // Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular data | 363 | // Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular data |
364 | 364 | ||
365 | imgstream = new MemoryStream(); | ||
366 | |||
367 | // Decode image to System.Drawing.Image | 365 | // Decode image to System.Drawing.Image |
368 | if (OpenJPEG.DecodeToImage(texture.Data, out managedImage, out image) && image != null) | 366 | if (OpenJPEG.DecodeToImage(texture.Data, out managedImage, out image) && image != null) |
369 | { | 367 | { |
@@ -404,10 +402,7 @@ namespace OpenSim.Capabilities.Handlers | |||
404 | if(managedImage != null) | 402 | if(managedImage != null) |
405 | managedImage.Clear(); | 403 | managedImage.Clear(); |
406 | if (imgstream != null) | 404 | if (imgstream != null) |
407 | { | ||
408 | imgstream.Close(); | ||
409 | imgstream.Dispose(); | 405 | imgstream.Dispose(); |
410 | } | ||
411 | } | 406 | } |
412 | 407 | ||
413 | return data; | 408 | return data; |
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs index d5df7a2..c339ec5 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs | |||
@@ -368,9 +368,6 @@ namespace OpenSim.Capabilities.Handlers | |||
368 | try | 368 | try |
369 | { | 369 | { |
370 | // Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular data | 370 | // Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular data |
371 | |||
372 | imgstream = new MemoryStream(); | ||
373 | |||
374 | // Decode image to System.Drawing.Image | 371 | // Decode image to System.Drawing.Image |
375 | if (OpenJPEG.DecodeToImage(texture.Data, out managedImage, out image) && image != null) | 372 | if (OpenJPEG.DecodeToImage(texture.Data, out managedImage, out image) && image != null) |
376 | { | 373 | { |
@@ -412,10 +409,7 @@ namespace OpenSim.Capabilities.Handlers | |||
412 | managedImage.Clear(); | 409 | managedImage.Clear(); |
413 | 410 | ||
414 | if (imgstream != null) | 411 | if (imgstream != null) |
415 | { | ||
416 | imgstream.Close(); | ||
417 | imgstream.Dispose(); | 412 | imgstream.Dispose(); |
418 | } | ||
419 | } | 413 | } |
420 | 414 | ||
421 | return data; | 415 | return data; |