globalmapper.ExportRasterFromBitmap =================================== .. currentmodule:: globalmapper .. py:function:: ExportRasterFromBitmap (str aFilename, HBITMAP aBitmap, HDC aDC, GM_RasterExportFormat_t32 aFormat, GM_Rectangle_t aWorldBounds, GM_RasterExportFlags_t32 aFlags) -> GM_Error_t32 .. note:: This function requires a Handle to Device Context (HDC), which comes from the Windows GUI. An HDC for a window is easy to get in C++, but unobtainable in Python without relying on other modules. As such, you may be unable to use this and other functions which need an HDC as parameter; they are included in the Python SDK for Global Mapper primarily for consistency with the C++ version of the SDK and are not fully supported at current release. Generates a new raster image from a bitmap handle. The new raster image will have the same number of pixels as the bitmap. The *aFormat* parameter specifies what image format to use for the new raster. If *aWorldBounds* is not None, the provided bounds will be used to fill in the spatial information for the new file, if supported by the new file format. :param str aFilename: Name of new file to create :param HBITMAP aBitmap: Handle to bitmap to export :param HDC aDC: Handle to compatible device context :param GM_RasterExportFormat_t32 aFormat: Format to export :param GM_Rectangle_t aWorldBounds: World bounds of bitmap or None for last drawn :param GM_RasterExportFlags_t32 aFlags: Export flags :returns: Error Code :rtype: GM_Error_t32