Global Mapper v26.0

how to BIL/BIP/BSQ file save ???

qudduq
qudduq Global Mapper UserTrusted User
edited June 2012 in SDK
//1. tif file load.


//2. Get the filename to save to
CFileDialog theSaveDialog
(
FALSE,
".tif",
NULL,
OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT,
"bip (*.bip)|*.bip|All Files|*.*||"
);
if ( IDOK != theSaveDialog.DoModal() )
return;

//3. Save the file biq
GM_Error_t32 theErr = GM_ExportRaster
(
theSaveDialog.GetPathName(), // Name of new file to create
GM_Export_BIL_Raster, // Format to export (equal BIL????)
NULL, // Layer list to export or NULL for all
0, // Number of layers in provided list (0 for all)
NULL, // World bounds to export or NULL for all
2048, // Width in pixels of new image
2048 // Height in pixels of new image
);

I want to save the BIP image file. how to use GM_ExportRaster() function???

cap.PNG
cap.PNG 26.7K

Comments

  • global_mapper
    global_mapper Administrator
    edited June 2012
    Which version of the SDK do you have? I can very easily add support for BIP and BSQ (just BIL is supported now) if you have the latest SDK release (v13.2).

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • qudduq
    qudduq Global Mapper User Trusted User
    edited June 2012
    Thanks, Mike
    I have the latest SDK release (v13.2).
    but bip and bsq Hard to find.

    how to use GM_ExportRaster() function???
  • global_mapper
    global_mapper Administrator
    edited June 2012
    The BIP and BSQ exports aren't there yet, I have to put together a new build of the SDK with that functionality added, then you can use GM_ExportRaster and pass in one of 2 new export types, GM_Export_BIP or GM_Export_BSQ. I'll let you know when I have a new build together.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • qudduq
    qudduq Global Mapper User Trusted User
    edited June 2012
    When the update is adding about?
  • qudduq
    qudduq Global Mapper User Trusted User
    edited June 2012
    Please, I should be used quickly.
    Do not be added quickly BIP function?
    Can you send me are first, if possible?
  • global_mapper
    global_mapper Administrator
    edited June 2012
    I have placed a new SDK build at http://www.globalmapper.com/GlobalMapperSDK_latest_beta.zip for you to try. It includes the latest code and the GM_Export_BIP and GM_Export_BSQ constants. This is uploading slowly so give it another 20 minutes or so if you get this immediately.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • qudduq
    qudduq Global Mapper User Trusted User
    edited June 2012
    Mike

    Thank you ^^
  • qudduq
    qudduq Global Mapper User Trusted User
    edited June 2012
    Mike
    Download the URL of this notice, but
    GM_Export_BIP Could not be found.
  • global_mapper
    global_mapper Administrator
    edited June 2012
    It seems some of the files in the SDK .zip didn't get updated. I have placed a new one at http://www.globalmapper.com/GlobalMapperSDK_latest_beta.zip that should include the updated headers as well.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • qudduq
    qudduq Global Mapper User Trusted User
    edited June 2012
    Tanks,
    Mike

    the file is downloaded
    however,
    there is a problem
    use GM_ExportRaster() function parameter with GM_Export_BIP.
    //how to use GM_ExportRaster() function parameter with GM_Export_BIP???


    //1. RGB 8bit 3band tif file load.
    //2. Get the filename to save to FileDialog
    //3. Save the file BIP
    GM_Error_t32 theErr = GM_ExportRaster
    (
    theSaveDialog.GetPathName(), // Name of new file to create
    GM_Export_BIP, // Format to export
    NULL, // Layer list to export or NULL for all
    0, // Number of layers in provided list (0 for all)
    NULL, // World bounds to export or NULL for all
    2048, // Width in pixels of new image
    2048//, // Height in pixels of new image
    );
    if ( GM_Error_NotRegistered == theErr )
    {
    mMapWindow.ShowNotRegisteredMessage
    (
    _T("You cannot export JPG files without having a registration file.")
    );
    }

    //#### result theErr = GM_Error_InvalidParam // A parameter was invalid

    //how to use GM_ExportRaster() function parameter with GM_Export_BIP???
  • global_mapper
    global_mapper Administrator
    edited June 2012
    It looks like you are passing in a mix of the parameters for GM_ExportRaster and GM_ExportRasterEx. Try the following instead:

    GM_Error_t32 theErr = GM_ExportRasterEx
    (
    theSaveDialog.GetPathName(), // Name of new file to create
    GM_Export_BIP, // Format to export
    NULL, // Layer list to export or NULL for all
    0, // Number of layers in provided list (0 for all)
    NULL, // World bounds to export or NULL for all
    2048, // Width in pixels of new image
    2048, // Height in pixels of new image
    0, // GM_RasterExportFlags_t32 - may need to set some of these
    NULL // extra option flags
    );

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com