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
- 345 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 636 GM Script Language
- 54 User Scripts
- 114 GPS Features
- 417 Projection Questions
- 825 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 178 Announcement and News
- 912 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 569 Other Discussion
- 131 GIS Data Sources
- 27 Global Mapper Showcase
- 238 How I use Global Mapper
- 107 Global Mapper Forum Website