Tesseract and tiff format - spp not in set {1,3}

前端 未结 4 1119
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-06 21:32

While trying to run this command:

tesseract bond111.tif bond111 batch.nochop makebox

I get the next error

Error in pixReadFromT         


        
4条回答
  •  一生所求
    2021-02-06 21:56

    You can try using the command 'tiffinfo' provided by libtiff_tools to verify the TIFF format of your src image. A number of TIFF formats exist, with different values for Bits-per-pixel (bpp) and Samples-per-pixel (spp).

    Error in pixReadFromTiffStream: spp not in set {1,3,4}

    An 'spp' value of 2 is invalid for TIFF.

    I solved the problem by saving directly to TIFF format from Gimp, instead of converting from .png to .tif using ImageMagick's 'convert'.

    See also: TIFF format

提交回复
热议问题