bit depth: 24!!! begeez! -- zoom levels work now.
parent
07d7c1cd2d
commit
2e77518c6d
|
@ -42,7 +42,9 @@ 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) :
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue