-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggest noting that libtiff must have been compiled with JPEG compression support for tests to run correctly #720
Comments
Thank you. I will amend the README.html to note that libjpeg is required with libtiff.
|
I'm not sure whether that's the best solution for the reported issue. TIFF files can be uncompressed, and such files work well with Leptonica and a libtiff without JPEG support. |
* Also fix colorcontent_reg to work with different jpeg libraries * Fixes Issue #719 and Issue #720, reported by @johnsonea. * Documentation change for Issue #717, reported by @kloczek.
It seems to me quite complicated to not require jpeg support for tiff, because many of the functions in tiffio.c accept the JPEG compression type as an argument. And because tiff, jpeg and png are the standard, expected libraries in the environment in which tesseract is running, it doesn't seem like a stretch to require jpeg for read/write of tiff. Also, for maintenance it is important to do everything possible to avoid problems with building that happen because functions asked for are missing. And if there is a failure at runtime, it's good to have a simple error message that says something to the effect that tiff is not supported. I could expand that error message in tiffiostub.c if you think it would be useful in the event of a runtime error to point out the necessity of having both libtiff and libjpeg. |
To diagnose why some TIFF images were giving an error, I temporarily edited libtiff's libtiff does have an error mechanism that -- if you can figure out how to use it's |
If
libtiff
has NOT been installed with JPEG compression (i.e.,./configure --enable-jpeg --enable-old-jpeg
), thenioformats_reg
gives errors on four images (FILE_8BPP_1
,FILE_8BPP_2
,FILE_8BPP_3
,"testbuffer.tif"
) .A note or warning in the leptonica documentation that JPEG must be enabled in libtiff would be helpful. Thx!
(
pngio_reg
also gave errors that disappeared whenlibtiff
was recomplied with JPEGs upport, but I did not investigate closely to see where or why.)The text was updated successfully, but these errors were encountered: