File indexing completed on 2024-12-22 04:15:42

0001 /*
0002  *  SPDX-FileCopyrightText: 2017 Victor Wåhlström <victor.wahlstrom@initiali.se>
0003  *
0004  *  SPDX-License-Identifier: LGPL-2.1-or-later
0005  */
0006 
0007 #include "kis_heightmap_utils.h"
0008 
0009 #include <KoColorModelStandardIds.h>
0010 #include <QByteArray>
0011 
0012 KoID KisHeightmapUtils::mimeTypeToKoID(const QByteArray& mimeType)
0013 {
0014     if (mimeType == "image/x-r8") {
0015         return Integer8BitsColorDepthID;
0016     }
0017     else if (mimeType == "image/x-r16") {
0018         return Integer16BitsColorDepthID;
0019     }
0020     else if (mimeType == "image/x-r32") {
0021         return Float32BitsColorDepthID;
0022     }
0023     return KoID();
0024 }