Refactor ClpPixelFormats enum

This commit is contained in:
2021-10-27 23:17:32 +01:00
parent bb2a1ac228
commit 480a7f1d38
29 changed files with 87 additions and 88 deletions
+4 -4
View File
@@ -80,7 +80,7 @@ bool StreamHandlerPortableMap::openHandler( std::string strFilename, bool bInput
}
}
m_uiBitsPerPixel = log( m_iMaxValue + 1 ) / log( 2 );
m_iPixelFormat = m_iMagicNumber == 1 || m_iMagicNumber == 2 || m_iMagicNumber == 5 ? ClpPixelFormats::CLP_GRAY : ClpPixelFormats::CLP_RGB24;
m_iPixelFormat = m_iMagicNumber == 1 || m_iMagicNumber == 2 || m_iMagicNumber == 5 ? ClpPixelFormats::Gray : ClpPixelFormats::RGB24;
}
else
{
@@ -89,17 +89,17 @@ bool StreamHandlerPortableMap::openHandler( std::string strFilename, bool bInput
if( m_uiBitsPerPixel == 1 )
{
m_iMagicNumber = 1;
m_iPixelFormat = ClpPixelFormats::CLP_GRAY;
m_iPixelFormat = ClpPixelFormats::Gray;
}
else if( colorSpace == CLP_COLOR_GRAY )
{
m_iMagicNumber = 5;
m_iPixelFormat = ClpPixelFormats::CLP_GRAY;
m_iPixelFormat = ClpPixelFormats::Gray;
}
else if( colorSpace == CLP_COLOR_RGB )
{
m_iMagicNumber = 6;
m_iPixelFormat = ClpPixelFormats::CLP_RGB24;
m_iPixelFormat = ClpPixelFormats::RGB24;
}
else
{