支持内存传输黑白图像
This commit is contained in:
parent
883137b93a
commit
afa66200a0
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue