Use lcms2 for color profiles

This commit is contained in:
2024-08-24 16:37:06 +02:00
parent ff5053b626
commit bc29dc7d34
8 changed files with 183 additions and 25 deletions
+10 -1
View File
@@ -1,13 +1,14 @@
#ifndef RAWIMAGE_H
#define RAWIMAGE_H
#include "libxisf.h"
#include <vector>
#include <algorithm>
#include <memory>
#include <stdint.h>
#include <math.h>
#include <memory.h>
#include <QImage>
#include <QColorSpace>
extern int THUMB_SIZE;
extern int THUMB_SIZE_BORDER;
@@ -73,6 +74,8 @@ protected:
float m_thumbAspect = 0.0;
Stats m_stats;
bool m_planar = false;
std::vector<uint8_t> m_iccProfile;
std::vector<uint16_t> m_lut;// actually qfloat16
void allocate(uint32_t w, uint32_t h, uint32_t ch, DataType type);
public:
RawImage();
@@ -112,6 +115,12 @@ public:
static size_t typeSize(DataType type);
std::vector<RawImage> split() const;
bool valid() const;
void setICCProfile(const QByteArray &icc);
void setICCProfile(const LibXISF::ByteArray &icc);
void convertTosRGB();
void generateLUT();
const std::vector<uint16_t>& getLUT() const;
};
//Q_DECLARE_SMART_POINTER_METATYPE(std::shared_ptr);