[mapguide-commits] r5457 - trunk/MgDev/Server/src/Services/Tile
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Dec 9 17:50:41 EST 2010
Author: brucedechant
Date: 2010-12-09 14:50:41 -0800 (Thu, 09 Dec 2010)
New Revision: 5457
Modified:
trunk/MgDev/Server/src/Services/Tile/TileCache.cpp
Log:
Fix for trac ticket 1567 - Tiled image is still PNG file although ImageFormat set to GIF
http://trac.osgeo.org/mapguide/ticket/1567
Notes:
- Added support for GIF image format
Modified: trunk/MgDev/Server/src/Services/Tile/TileCache.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Tile/TileCache.cpp 2010-12-09 21:17:27 UTC (rev 5456)
+++ trunk/MgDev/Server/src/Services/Tile/TileCache.cpp 2010-12-09 22:50:41 UTC (rev 5457)
@@ -80,8 +80,8 @@
format,
MgConfigProperties::DefaultTileServicePropertyImageFormat);
- // Only allow PNG, PNG8 and JPG as tile formats
- if (format == MgImageFormats::Png || format == MgImageFormats::Png8 || format == MgImageFormats::Jpeg)
+ // Only allow GIF, PNG, PNG8 and JPG as tile formats
+ if (format == MgImageFormats::Png || format == MgImageFormats::Png8 || format == MgImageFormats::Jpeg || format == MgImageFormats::Gif)
{
MgTileParameters::tileFormat = format;
}
@@ -121,6 +121,10 @@
{
tilePathname += L"jpg";
}
+ else if (MgTileParameters::tileFormat == MgImageFormats::Gif)
+ {
+ tilePathname += L"gif";
+ }
else
{
tilePathname += L"png";
@@ -155,6 +159,10 @@
{
byteSource->SetMimeType(MgMimeType::Jpeg);
}
+ else if (MgTileParameters::tileFormat == MgImageFormats::Gif)
+ {
+ byteSource->SetMimeType(MgMimeType::Gif);
+ }
else
{
byteSource->SetMimeType(MgMimeType::Png);
More information about the mapguide-commits
mailing list