Always make 4 channels
This commit is contained in:
+3
-3
@@ -1,8 +1,8 @@
|
||||
#include "rawimage.h"
|
||||
#include <cstring>
|
||||
#include <lcms2.h>
|
||||
#include <algorithm>
|
||||
#ifndef NO_QT
|
||||
#include <lcms2.h>
|
||||
#include <QDebug>
|
||||
#include <QElapsedTimer>
|
||||
#include <QFloat16>
|
||||
@@ -55,7 +55,7 @@ void RawImage::allocate(uint32_t w, uint32_t h, uint32_t ch, DataType type)
|
||||
m_width = w;
|
||||
m_height = h;
|
||||
m_channels = ch;
|
||||
m_ch = ch == 3 ? 4 : ch;
|
||||
m_ch = ch > 1 ? 4 : ch;
|
||||
m_origType = m_type = type;
|
||||
m_pixels = std::make_unique<PixelType[]>((size_t)m_width * m_height * m_ch * typeSize(type));
|
||||
}
|
||||
@@ -1071,7 +1071,6 @@ void RawImage::setICCProfile(const QByteArray &icc)
|
||||
if(icc.size())
|
||||
m_iccProfile = std::vector<uint8_t>(icc.begin(), icc.end());
|
||||
}
|
||||
#endif
|
||||
|
||||
void RawImage::setICCProfile(const LibXISF::ByteArray &icc)
|
||||
{
|
||||
@@ -1180,6 +1179,7 @@ void RawImage::generateLUT()
|
||||
cmsCloseProfile(inProfile);
|
||||
cmsCloseProfile(outProfile);
|
||||
}
|
||||
#endif
|
||||
|
||||
void RawImage::applySTF(const MTFParam &mtfParams)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user