PhilterPaper / Perl-PDF-Builder

Extended version of the popular PDF::API2 Perl-based PDF library for creating, reading, and modifying PDF documents
https://www.catskilltech.com/FreeSW/product/PDF%2DBuilder/title/PDF%3A%3ABuilder/freeSW_full
Other
6 stars 7 forks source link

+ LZW compression and use for TIFF images that are LZW-compressed #152

Closed carygravel closed 3 years ago

carygravel commented 3 years ago

This is where I am at the moment. The LZW compression/decompression code round-trips for everything I have seen so far. However, it is SLOW.

Some of your collection of TIFFs still do not display properly. I currently suspect this is not due to the LZW compression, but rather because of missing image parameters in the PDF. Can you help me fix this?

Once we have the display bugs fixed, I'll look at addressing the performance problems.

PhilterPaper commented 3 years ago

All my TIFFs were collected "in the wild". I did not create any of them. I think it would be necessary to accommodate missing image parameters, rather than fixing the images (if that's what you are asking).

It doesn't sound good that you have to decompress/recompress everything. It doesn't sound like it's any improvement over the original LZW-to-Flate cycle, except that perhaps some edge/corner cases are fixed?

Anyway, a "heads up" that I'm going to revert the TIFF code so that I can get 3.022 out the door, and we won't feel rushed to get the LZW matter dealt with, as it's apparently a pretty big deal.

carygravel commented 3 years ago

All my TIFFs were collected "in the wild". I did not create any of them. I think it would be necessary to accommodate missing image parameters, rather than fixing the images (if that's what you are asking).

Absolutely. I was asking you to help me find the correct image parameters, not change the TIFFs.

PhilterPaper commented 3 years ago

Well, you are at least as skilled in TIFF itself, and as familiar with TIFF-handling in PDF::Builder, as I am! As far as looking inside a TIFF file for possibly missing or corrupt tags, all I have is something I got off the web, AsTiffTagViewer, which dumps all the tags. If you can't find it, or can't run it on Linux, I could dump the tags for the offending TIFF files and send them to you. Let me know.

When working on the TIFF code, I've seen some things that look a little odd to me (mostly missing tags), but I'm not expert enough on TIFF to say that could be a reason that some library fails.

carygravel commented 3 years ago

Well, you are at least as skilled in TIFF itself, and as familiar with TIFF-handling in PDF::Builder, as I am!

I meant manipulating the PDF options.

Now that this has diverged from master, I'll create a new branch and delete this.