VERIFIED SOLUTION i
X

Resolve image distortion on Windows 7 and Windows Server MapXtreme .NET

Issue

The problem occurs when the map contains a layer with Bitmap Fill Patterns. The fill patterns do not scale correctly and this leads to very bad quality when the maps are printed.

Screenshots of correct and incorrect fill patterns
 

Cause

This was a Microsoft issue on Windows 7 and Windows Server 2008.
 

Resolution

UPDATED: May 30, 2017


After further investigations it was concluded that this is a problem with GdiPlus.Dll on Windows 7 64 bit and Windows 2008. Microsoft has provided a workaround to overcome this problem on problematic Windows OS.

Workaround:
If you want to print/export transparent images on 64 bit Windows 7 and Windows 2k8 platforms then try to switch to GdiPlus.Dll v1.0 instead of v1.1. You can easily switch to GdiPlus.dll v1.0 using the manifest file and by using the linker switch.

For C++ you can add the following lines in the main/precompiled header (.h) file

#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.GdiPlus' version='1.0.7601.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.GdiPlus' version='1.0.7601.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.GdiPlus' version='1.0.7601.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df'\"")
#endif

For C# or .net user you can use the following entry in the manifest file of the application (if this already exists)
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32"
name="Microsoft.Windows.GdiPlus"
processorArchitecture="*"
version="1.0.7601.0"
publicKeyToken="6595b64144ccf1df"
language="*"/>
</dependentAssembly>
</dependency>

Or
There is ample help available on internet related to manifest file
http://msdn.microsoft.com/en-us/library/aa374191(v=vs.85) <http://msdn.microsoft.com/en-us/library/aa374191(v=vs.85)>.aspx

Environment Details

Products affected: MapXtreme .NET on Windows 7 64 bit and Windows Server 2008

Downloads

  • No Downloads