sane图像为RGB时位深为8而不是24,解决app错误

This commit is contained in:
luoliangyi 2022-05-27 11:05:17 +08:00
parent 4f60853960
commit 9cd7e4573d
1 changed files with 1 additions and 2 deletions

View File

@ -2012,8 +2012,7 @@ int MainWindow::sane_ex_callback(SANE_Handle hdev, int code, void *data, unsigne
else if (8 == sane_img->header.depth) else if (8 == sane_img->header.depth)
imgType = HGBASE_IMGTYPE_GRAY; imgType = HGBASE_IMGTYPE_GRAY;
} }
else if (sane_img->header.format == SANE_FRAME_RGB else if (sane_img->header.format == SANE_FRAME_RGB)
&& 24 == sane_img->header.depth)
{ {
imgType = HGBASE_IMGTYPE_RGB; imgType = HGBASE_IMGTYPE_RGB;
} }