From 2e77518c6dd5f06c965df758ebd0a20a39c96dc8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 12 Jun 2011 21:51:26 -0700 Subject: bit depth: 24!!! begeez! -- zoom levels work now. --- OpenSim/Server/Handlers/Map/MapGetServerConnector.cs | 4 +++- OpenSim/Services/MapImageService/MapImageService.cs | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs index 76dd695..53d08fa 100644 --- a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs +++ b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs @@ -42,11 +42,13 @@ namespace OpenSim.Server.Handlers.MapImage { public class MapGetServiceConnector : ServiceConnector { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IMapImageService m_MapService; + private string m_ConfigName = "MapImageService"; public MapGetServiceConnector(IConfigSource config, IHttpServer server, string configName) : - base(config, server, configName) + base(config, server, configName) { IConfig serverConfig = config.Configs[m_ConfigName]; if (serverConfig == null) diff --git a/OpenSim/Services/MapImageService/MapImageService.cs b/OpenSim/Services/MapImageService/MapImageService.cs index ee424e1..736fa2e 100644 --- a/OpenSim/Services/MapImageService/MapImageService.cs +++ b/OpenSim/Services/MapImageService/MapImageService.cs @@ -144,7 +144,6 @@ namespace OpenSim.Services.MapImageService } else if (File.Exists(m_WaterTileFile)) { - m_log.DebugFormat("[MAP IMAGE SERVICE]: File not found {0}, sending water", fileName); return File.ReadAllBytes(m_WaterTileFile); } else @@ -188,7 +187,7 @@ namespace OpenSim.Services.MapImageService else { // Create a new output tile with a transparent background - Bitmap bm = new Bitmap(IMAGE_WIDTH, IMAGE_WIDTH); + Bitmap bm = new Bitmap(IMAGE_WIDTH, IMAGE_WIDTH, PixelFormat.Format24bppRgb); bm.MakeTransparent(); return bm; } @@ -255,7 +254,7 @@ namespace OpenSim.Services.MapImageService using (Bitmap final = new Bitmap(output)) { output.Dispose(); - final.Save(outputFile); + final.Save(outputFile, ImageFormat.Jpeg); } } catch (Exception e) -- cgit v1.1