You can specify the raster image format using the Type parameter of the RxRasterServices::saveRasterImage() method. Or, if Type is not specified, the file extension is used.
For more information, please refer to the RasterExport sample application (Kernel/Exports/RasterExport/Source/RasterExportCmd.cpp).