Image just some color converted into black and white

17 views
Skip to first unread message

Stéphane Brunner

unread,
Nov 22, 2025, 11:57:30 AM (yesterday) Nov 22
to tesseract-ocr
Hello,

When I run the command:
tesseract image-1.png output -l fra pdf 

With an image that contains e.g. a black and white test and just a blue signature, in the generated PDF the signature is in gray!

More information about the image
file image-1.png
image-1.png: PNG image data, 1989 x 2858, 4-bit colormap, non-interlaced

Is there an option in Tesseract to avoid this conversion?
Thanks in advance
Stéphane

Zdenko Podobny

unread,
Nov 22, 2025, 12:02:10 PM (yesterday) Nov 22
to tesser...@googlegroups.com
Which version of tesseract you use? Can you provide test image?

Zdenko

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/tesseract-ocr/7cc3a108-dc75-40a7-8210-51f8fa9524dbn%40googlegroups.com.

Stéphane Brunner

unread,
Nov 22, 2025, 12:23:36 PM (yesterday) Nov 22
to tesser...@googlegroups.com
Hello,

tesseract --version
tesseract 5.3.4
 leptonica-1.82.0
  libgif 5.2.1 : libjpeg 8d (libjpeg-turbo 2.1.5) : libpng 1.6.43 : libtiff 4.5.1 : zlib 1.3 : libwebp 1.3.2 : libopenjp2 2.5.0
 Found AVX512BW
 Found AVX512F
 Found AVX512VNNI
 Found AVX2
 Found AVX
 Found FMA
 Found SSE4.1
 Found OpenMP 201511
 Found libarchive 3.7.2 zlib/1.3 liblzma/5.4.5 bz2lib/1.0.8 liblz4/1.9.4 libzstd/1.5.5
 Found libcurl/8.5.0 OpenSSL/3.0.13 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.2 (+libidn2/2.3.7) libssh/0.10.6/openssl/zlib nghttp2/1.59.0 librtmp/2.3 OpenLDAP/2.6.7


> Can you provide test image?
No because she contains personal data, but I build an image that generates the same issue

Note the with Gimp I create a PNG image with 256 colors that doesn't have the issue then I optimize it with pngquant:
pngquant --force --speed=1 --strip --quality=0-31 - < image-gimp.png > image.png

And the generated image has the issue!

Then if I can do something on my image as a workaround that didn't deoptimize the image, it will be fine :-)
Does the newer version of Tesseract resolve this issue?

Thanks in advance
Stéphane


image.png
output.pdf

Zdenko Podobny

unread,
Nov 22, 2025, 2:01:47 PM (yesterday) Nov 22
to tesser...@googlegroups.com
Hello,

You are using old version of tesseract - please update to current version 5.5.1

Zdenko


so 22. 11. 2025 o 18:23 Stéphane Brunner <stephane...@gmail.com> napísal(a):
image_png.pdf
Reply all
Reply to author
Forward
0 new messages