diff --git a/sane/scanned_img.cpp b/sane/scanned_img.cpp index 69e093b..fa4c22a 100644 --- a/sane/scanned_img.cpp +++ b/sane/scanned_img.cpp @@ -469,6 +469,7 @@ std::string scanned_img::file_header(SANE_ImageType type, float resolution) pal_size = 2 * sizeof(int); else if (bih.biBitCount == 8) pal_size = 256 * sizeof(int); + bih.biClrUsed = pal_size / sizeof(int); // some APP (PJScanner.exe ¹â´ó¡­¡­) use this field to calculate pallete { BITMAPFILEHEADER fh = { 0 };