Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
586 B
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2017 Victor Wåhlström <[email protected]>
 *
 *  SPDX-License-Identifier: LGPL-2.1-or-later
 */

#include "kis_heightmap_utils.h"

#include <KoColorModelStandardIds.h>
#include <QByteArray>

KoID KisHeightmapUtils::mimeTypeToKoID(const QByteArray& mimeType)
{
    if (mimeType == "image/x-r8") {
        return Integer8BitsColorDepthID;
    }
    else if (mimeType == "image/x-r16") {
        return Integer16BitsColorDepthID;
    }
    else if (mimeType == "image/x-r32") {
        return Float32BitsColorDepthID;
    }
    return KoID();
}