From 621c51967d4c2005c229666bc97f89cd5dd20996 Mon Sep 17 00:00:00 2001 From: ptahmose Date: Mon, 28 Aug 2023 10:23:13 +0200 Subject: [PATCH] bytes-per-pel for pixeltype "Bgr192ComplexFloat" is 24 (not 48) (#62) * bytes-per-pel for pixeltype "Bgr192ComplexFloat" is 24 (not 48) * bump version --- CMakeLists.txt | 2 +- Src/libCZI/CziUtils.cpp | 8 ++++---- Src/libCZI/CziUtils.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 789af9cd..384ff9c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.15) cmake_policy(SET CMP0091 NEW) # enable new "MSVC runtime library selection" (https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html) project(libCZI - VERSION 0.50.0 + VERSION 0.50.1 HOMEPAGE_URL "https://github.com/ZEISS/libczi" DESCRIPTION "libCZI is an Open Source Cross-Platform C++ library to read and write CZI") diff --git a/Src/libCZI/CziUtils.cpp b/Src/libCZI/CziUtils.cpp index 48806749..8d2bc029 100644 --- a/Src/libCZI/CziUtils.cpp +++ b/Src/libCZI/CziUtils.cpp @@ -52,9 +52,9 @@ using namespace libCZI; { switch (i) { - case 0: return CompressionMode::UnCompressed; - case 1: return CompressionMode::Jpg; - case 4: return CompressionMode::JpgXr; + case 0: return CompressionMode::UnCompressed; + case 1: return CompressionMode::Jpg; + case 4: return CompressionMode::JpgXr; case 5: return CompressionMode::Zstd0; case 6: return CompressionMode::Zstd1; default: return CompressionMode::Invalid; @@ -92,7 +92,7 @@ using namespace libCZI; case PixelType::Bgr96Float: return 12; case PixelType::Bgra32: return 4; case PixelType::Gray64ComplexFloat: return 16; - case PixelType::Bgr192ComplexFloat: return 48; + case PixelType::Bgr192ComplexFloat: return 24; case PixelType::Gray32: return 4; case PixelType::Gray64Float: return 8; default: throw std::invalid_argument("illegal pixeltype"); diff --git a/Src/libCZI/CziUtils.h b/Src/libCZI/CziUtils.h index 4af44af1..9d90a0c7 100644 --- a/Src/libCZI/CziUtils.h +++ b/Src/libCZI/CziUtils.h @@ -45,4 +45,4 @@ template <> constexpr std::uint8_t CziUtils::BytesPerPel constexpr std::uint8_t CziUtils::BytesPerPel() { return 4; } template <> constexpr std::uint8_t CziUtils::BytesPerPel() { return 3 * 4; } template <> constexpr std::uint8_t CziUtils::BytesPerPel() { return 2 * 8; } -template <> constexpr std::uint8_t CziUtils::BytesPerPel() { return 48; } +template <> constexpr std::uint8_t CziUtils::BytesPerPel() { return 24; }