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.8K All Categories
- 5.7K Features Discussion
- 346 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 639 GM Script Language
- 54 User Scripts
- 115 GPS Features
- 419 Projection Questions
- 829 Raster Data
- 1.4K Vector Data
- 6.6K Support
- 179 Announcement and News
- 923 Bug Report
- 560 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 574 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 241 How I use Global Mapper
- 108 Global Mapper Forum Website