mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
bit depth: 24!!! begeez! -- zoom levels work now.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user