Background Color issues in 64bit dll
nickgoodliff
Global Mapper UserTrusted User
Hi Mike
A weird one - I'm just testing a 64bit version of my tool, which uses the 64bit dll. All works fine except the background color that I am setting like this:
GM_Color_t white = new GM_Color_t();
white.mBlue = 255;
white.mRed = 255;
white.mGreen = 255;
GlobalMapperDLL.GM_SetBackgroundColor(white);
In the 64bit version the background color of any outputted jpgs is a pale green, instead of the white that the 32bit produces. Any ideas?
Cheers
Nick
A weird one - I'm just testing a 64bit version of my tool, which uses the 64bit dll. All works fine except the background color that I am setting like this:
GM_Color_t white = new GM_Color_t();
white.mBlue = 255;
white.mRed = 255;
white.mGreen = 255;
GlobalMapperDLL.GM_SetBackgroundColor(white);
In the 64bit version the background color of any outputted jpgs is a pale green, instead of the white that the 32bit produces. Any ideas?
Cheers
Nick
Comments
-
Nick,
The GM_SetBackgroundColor function takes a COLORREF and not a GM_Color_t structure. It could be that in 32-bit the GM_Color_t structure happens to have the same layout as COLORREF. In C# the declaration should be:
// Sets the color to be used for background pixels when drawing and exporting
[DllImport(DLLFileName, EntryPoint = "GM_SetBackgroundColor")]
public static extern UInt32 GM_SetBackgroundColor
(
UInt32 aBgColor // (COLORREF) in: background color to set (AARRGGBB)
);
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website