bit depth: 24!!! begeez! -- zoom levels work now.

bulletsim
Diva Canto 2011-06-12 21:51:26 -07:00
parent 07d7c1cd2d
commit 2e77518c6d
2 changed files with 5 additions and 4 deletions

View File

@ -42,11 +42,13 @@ namespace OpenSim.Server.Handlers.MapImage
{ {
public class MapGetServiceConnector : ServiceConnector public class MapGetServiceConnector : ServiceConnector
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IMapImageService m_MapService; private IMapImageService m_MapService;
private string m_ConfigName = "MapImageService"; private string m_ConfigName = "MapImageService";
public MapGetServiceConnector(IConfigSource config, IHttpServer server, string configName) : public MapGetServiceConnector(IConfigSource config, IHttpServer server, string configName) :
base(config, server, configName) base(config, server, configName)
{ {
IConfig serverConfig = config.Configs[m_ConfigName]; IConfig serverConfig = config.Configs[m_ConfigName];
if (serverConfig == null) if (serverConfig == null)

View File

@ -144,7 +144,6 @@ namespace OpenSim.Services.MapImageService
} }
else if (File.Exists(m_WaterTileFile)) else if (File.Exists(m_WaterTileFile))
{ {
m_log.DebugFormat("[MAP IMAGE SERVICE]: File not found {0}, sending water", fileName);
return File.ReadAllBytes(m_WaterTileFile); return File.ReadAllBytes(m_WaterTileFile);
} }
else else
@ -188,7 +187,7 @@ namespace OpenSim.Services.MapImageService
else else
{ {
// Create a new output tile with a transparent background // 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(); bm.MakeTransparent();
return bm; return bm;
} }
@ -255,7 +254,7 @@ namespace OpenSim.Services.MapImageService
using (Bitmap final = new Bitmap(output)) using (Bitmap final = new Bitmap(output))
{ {
output.Dispose(); output.Dispose();
final.Save(outputFile); final.Save(outputFile, ImageFormat.Jpeg);
} }
} }
catch (Exception e) catch (Exception e)