Function saveImageDialog

Synopsis

#include <Source/Falcor/Utils/Image/Bitmap.h>

static void saveImageDialog(Texture *pTexture)

Description

Open dialog to save image to a file

Parameters:

[ in ] pTexture - Texture to save to file

Source

Lines 397-408 in Source/Falcor/Utils/Image/Bitmap.cpp. Line 83 in Source/Falcor/Utils/Image/Bitmap.h.

void Bitmap::saveImageDialog(Texture* pTexture)
{
    std::string filePath;
    auto supportExtensions = getFileDialogFilters(pTexture->getFormat());
    if (saveFileDialog(supportExtensions, filePath))
    {
        std::string ext = getExtensionFromFile(filePath);
        auto format = getFormatFromFileExtension(ext);
        pTexture->captureToFile(0, 0, filePath, format);
    }
}





Add Discussion as Guest

Log in to DocsForge