aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing
diff options
context:
space:
mode:
authorMelanie2013-11-08 17:55:01 +0000
committerMelanie2013-11-08 17:55:01 +0000
commit91b70bf3fe382729a94d9a0855be8b07ef67c360 (patch)
tree3e42c4c536da6c7eaaf1a72ecdbd2a24de4d1658 /OpenSim/Region/Physics/Meshing
parentMerge branch 'master' into careminster (diff)
parentIf the LSL state_entry() event definition contains any parameters, then gener... (diff)
downloadopensim-SC-91b70bf3fe382729a94d9a0855be8b07ef67c360.zip
opensim-SC-91b70bf3fe382729a94d9a0855be8b07ef67c360.tar.gz
opensim-SC-91b70bf3fe382729a94d9a0855be8b07ef67c360.tar.bz2
opensim-SC-91b70bf3fe382729a94d9a0855be8b07ef67c360.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
Diffstat (limited to 'OpenSim/Region/Physics/Meshing')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 16d65eb..e92ae50 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -629,10 +629,11 @@ namespace OpenSim.Region.Physics.Meshing
629 629
630 try 630 try
631 { 631 {
632 OpenMetaverse.Imaging.ManagedImage unusedData; 632 OpenMetaverse.Imaging.ManagedImage managedImage;
633 OpenMetaverse.Imaging.OpenJPEG.DecodeToImage(primShape.SculptData, out unusedData, out idata);
634 633
635 if (idata == null) 634 OpenMetaverse.Imaging.OpenJPEG.DecodeToImage(primShape.SculptData, out managedImage);
635
636 if (managedImage == null)
636 { 637 {
637 // In some cases it seems that the decode can return a null bitmap without throwing 638 // In some cases it seems that the decode can return a null bitmap without throwing
638 // an exception 639 // an exception
@@ -641,9 +642,12 @@ namespace OpenSim.Region.Physics.Meshing
641 return false; 642 return false;
642 } 643 }
643 644
644 unusedData = null; 645 if ((managedImage.Channels & OpenMetaverse.Imaging.ManagedImage.ImageChannels.Alpha) != 0)
646 managedImage.ConvertChannels(managedImage.Channels & ~OpenMetaverse.Imaging.ManagedImage.ImageChannels.Alpha);
645 647
646 //idata = CSJ2K.J2kImage.FromBytes(primShape.SculptData); 648 Bitmap imgData = OpenMetaverse.Imaging.LoadTGAClass.LoadTGA(new MemoryStream(managedImage.ExportTGA()));
649 idata = (Image)imgData;
650 managedImage = null;
647 651
648 if (cacheSculptMaps) 652 if (cacheSculptMaps)
649 { 653 {