leptonica icon indicating copy to clipboard operation
leptonica copied to clipboard

Feature request: Zstd and WebP compression in TIFF

Open zdenop opened this issue 5 years ago • 7 comments

tiff-4.0.10 has Zstd and WebP compression implemented. As far as I see (e.g. in pixWriteToTiffStream) they are not supported in tiff operation by leptonica (even leptonica itself support WebP).

IMO I would great to have these features in leptonica too.

zdenop avatar Mar 25 '19 10:03 zdenop

I had not heard of Zstd. Reading the wikipedia page, I see that it now has two licenses: BSD and GPLv2.

All of the (few) libraries that Leptonica depends on are covered with a friendly licence like Apache or BSD. None of them are covered by GPLv2, which I believe is the original GPL. GPL was designed to infect code that uses GPL-covered code with GPL. Does anyone know if linking to this library in any way changes the license of a program or library that links or calls into it?

DanBloomberg avatar Mar 25 '19 17:03 DanBloomberg

According to https://github.com/facebook/zstd, it is dual licensed, while https://facebook.github.io/zstd/ only speaks of the BSD license. In any case it seems to be compatible with Leptonica because you can choose the license which fits best for dual license software, and BSD is compatible.

stweil avatar Mar 25 '19 18:03 stweil

Unrelated: I recently thought about using Poppler in Leptonica or in Tesseract for reading PDF files. That does not work because Poppler uses only GPL. :-(

stweil avatar Mar 25 '19 18:03 stweil

Here's a comment about the license(s) from @terrelln https://news.ycombinator.com/item?id=16719001

He is one of the main developers: https://github.com/facebook/zstd/graphs/contributors

amitdo avatar Mar 25 '19 18:03 amitdo

Good to know that there are no issues with the copyright licenses for zstd.

On Mon, Mar 25, 2019 at 11:27 AM Amit D. [email protected] wrote:

Here's a comment about the license(s) from @terrelln https://github.com/terrelln https://news.ycombinator.com/item?id=16719001

He is one of the main developers: https://github.com/facebook/zstd/graphs/contributors

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DanBloomberg/leptonica/issues/411#issuecomment-476322792, or mute the thread https://github.com/notifications/unsubscribe-auth/AP6mLLXKPXy_rLqUMi416Z7wp8K0hsqeks5vaRUjgaJpZM4cGkLu .

DanBloomberg avatar Mar 25 '19 18:03 DanBloomberg

Just to confirm, you may choose either the BSD license, or the GPLv2 license.

terrelln avatar Mar 25 '19 18:03 terrelln

@stweil Another problem with reading pdf files within leptonica is the headache I would get from fuzzing. Leptonica is now being fuzzed on a continuous basis by the most capable fuzzing team in the world, and they instrument all the input formats for entry points to cause breakage. For example, I just made some improvements to tiff I/O, allowing gray+alpha input and rgba output, and filtering out tiles and pixel types that are not uint, etc, and my "reward" is a new fuzz bug. "No good deed goes unpunished" ;-)

DanBloomberg avatar May 09 '19 19:05 DanBloomberg