diff --git a/twain/twain/huagaods.cpp b/twain/twain/huagaods.cpp index 7f7962c..133a280 100644 --- a/twain/twain/huagaods.cpp +++ b/twain/twain/huagaods.cpp @@ -1000,7 +1000,12 @@ Result huagao_ds::imageInfoGet(const Identity&, ImageInfo& data) if (m_compression == Compression::Group4) data.setPixelType(PixelType::BlackWhite); else - data.setPixelType(head.format == SANE_FRAME_RGB ? PixelType::Rgb : PixelType::Gray); + { + if (head.format == SANE_FRAME_RGB) + data.setPixelType(PixelType::Rgb); + else if(head.format == SANE_FRAME_GRAY) + data.setPixelType(head.depth == 1 ? PixelType::BlackWhite : PixelType::Gray); + } data.setPlanar(false); data.setWidth(head.pixels_per_line);