aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorHomer Horwitz2008-10-09 18:46:09 +0000
committerHomer Horwitz2008-10-09 18:46:09 +0000
commitddfff68c20c32bcd61fc540656850fdd6541000a (patch)
treee91a70e377ac8f528a577e9c163c277852712877
parent* Bump server info number to 0.5.11 (diff)
downloadopensim-SC_OLD-ddfff68c20c32bcd61fc540656850fdd6541000a.zip
opensim-SC_OLD-ddfff68c20c32bcd61fc540656850fdd6541000a.tar.gz
opensim-SC_OLD-ddfff68c20c32bcd61fc540656850fdd6541000a.tar.bz2
opensim-SC_OLD-ddfff68c20c32bcd61fc540656850fdd6541000a.tar.xz
Clean up webmap-generation a bit:
- Remove some duplicated code - Avoid unnecessary allocation of variables/values if only used once anyway.
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs20
1 files changed, 3 insertions, 17 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
index 9b4a997..ca64379 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
@@ -719,25 +719,11 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
719 // Save to bitmap 719 // Save to bitmap
720 mapTexture = new Bitmap(image); 720 mapTexture = new Bitmap(image);
721 721
722 ImageCodecInfo myImageCodecInfo;
723
724 Encoder myEncoder;
725
726 EncoderParameter myEncoderParameter;
727 EncoderParameters myEncoderParameters = new EncoderParameters(); 722 EncoderParameters myEncoderParameters = new EncoderParameters();
723 myEncoderParameters.Param[0] = new EncoderParameter(Encoder.Quality, 95L);
728 724
729 myImageCodecInfo = GetEncoderInfo("image/jpeg"); 725 // Save bitmap to stream
730 726 mapTexture.Save(imgstream, GetEncoderInfo("image/jpeg"), myEncoderParameters);
731 myEncoder = Encoder.Quality;
732
733 myEncoderParameter = new EncoderParameter(myEncoder, 95L);
734 myEncoderParameters.Param[0] = myEncoderParameter;
735
736 myEncoderParameter = new EncoderParameter(myEncoder, 95L);
737 myEncoderParameters.Param[0] = myEncoderParameter;
738
739 // Save bitmap to stream
740 mapTexture.Save(imgstream, myImageCodecInfo, myEncoderParameters);
741 727
742 // Write the stream to a byte array for output 728 // Write the stream to a byte array for output
743 jpeg = imgstream.ToArray(); 729 jpeg = imgstream.ToArray();