diff options
author | Dahlia Trimble | 2009-02-15 04:00:00 +0000 |
---|---|---|
committer | Dahlia Trimble | 2009-02-15 04:00:00 +0000 |
commit | 7731c055e4c29ada938473505837ec93ebba7044 (patch) | |
tree | a408b1afcde1b14eddbdc15bc66cc611625e944e /OpenSim/Region | |
parent | Thank you, DoranZemlja, for a patch that addresses some moe llGetNextEmail (diff) | |
download | opensim-SC_OLD-7731c055e4c29ada938473505837ec93ebba7044.zip opensim-SC_OLD-7731c055e4c29ada938473505837ec93ebba7044.tar.gz opensim-SC_OLD-7731c055e4c29ada938473505837ec93ebba7044.tar.bz2 opensim-SC_OLD-7731c055e4c29ada938473505837ec93ebba7044.tar.xz |
Set sculpt map alpha to 255 prior to scaling and meshing. Addresses Mantis #3150
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/SculptMesh.cs | 8 |
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, |