aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/SculptMesh.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
index b447eaa..06584b2 100644
--- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs
+++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
@@ -59,6 +59,14 @@ namespace PrimMesher
59 int destWidth = (int)(srcImage.Width * scale); 59 int destWidth = (int)(srcImage.Width * scale);
60 int destHeight = (int)(srcImage.Height * scale); 60 int destHeight = (int)(srcImage.Height * scale);
61 61
62 if (srcImage.PixelFormat == PixelFormat.Format32bppArgb)
63 for (int y = 0; y < srcImage.Height; y++)
64 for (int x = 0; x < srcImage.Width; x++)
65 {
66 Color c = srcImage.GetPixel(x, y);
67 srcImage.SetPixel(x, y, Color.FromArgb(255, c.R, c.G, c.B));
68 }
69
62 Bitmap scaledImage = new Bitmap(destWidth, destHeight, 70 Bitmap scaledImage = new Bitmap(destWidth, destHeight,
63 PixelFormat.Format24bppRgb); 71 PixelFormat.Format24bppRgb);
64 scaledImage.SetResolution(srcImage.HorizontalResolution, 72 scaledImage.SetResolution(srcImage.HorizontalResolution,