mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-10-31 06:41:58 +00:00
fix: distinguish DDS formats by pixel bit depth (#1048)
Match bit depth as well as channel masks.
This commit is contained in:
2 files changed
+36
-3
No files matched your search
@@ -172,9 +172,10 @@ namespace
|
||||
|
||||
const auto* unsignedImageFormat = dynamic_cast<const ImageFormatUnsigned*>(imageFormat);
|
||||
|
||||
if (unsignedImageFormat->m_r_offset == rOffset && unsignedImageFormat->m_r_size == rSize && unsignedImageFormat->m_g_offset == gOffset
|
||||
&& unsignedImageFormat->m_g_size == gSize && unsignedImageFormat->m_b_offset == bOffset && unsignedImageFormat->m_b_size == bSize
|
||||
&& unsignedImageFormat->m_a_offset == aOffset && unsignedImageFormat->m_a_size == aSize)
|
||||
if (unsignedImageFormat->m_bits_per_pixel == pf.dwRGBBitCount && unsignedImageFormat->m_r_offset == rOffset
|
||||
&& unsignedImageFormat->m_r_size == rSize && unsignedImageFormat->m_g_offset == gOffset && unsignedImageFormat->m_g_size == gSize
|
||||
&& unsignedImageFormat->m_b_offset == bOffset && unsignedImageFormat->m_b_size == bSize && unsignedImageFormat->m_a_offset == aOffset
|
||||
&& unsignedImageFormat->m_a_size == aSize)
|
||||
{
|
||||
m_format = imageFormat;
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user