Background Color issues in 64bit dll

nickgoodliffnickgoodliff Global Mapper UserPosts: 45Trusted User
edited May 2013 in SDK
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

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited May 2013
    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
Sign In or Register to comment.