Closed Lucas-C closed 1 month ago
Hi!
I'd love to work on this issue can you assign me?
Sure, done!
Hi @opposss
Have you been able to start working on this implementation? Do you have any questions?
Hi @Lucas-C
Almost done, I will send the PR for review soon. Before that I would like to ask 2 questions:
1) Do I understand correctly that I can completely use the code that was written by @MartinThoma ?
2) Should I add logic to use the LZW filter in case of GIF images or other image formats?
Almost done, I will send the PR for review soon.
Great! 👍
- Do I understand correctly that I can completely use the code that was written by @MartinThoma ?
Yes!
- Should I add logic to use the LZW filter in case of GIF images or other image formats?
If you can find a mention that this is supported, in the PDF spec (PDF32000_2008.pdf), or that main PDF readers support it (Adobe Acrobat, Sumatra PDF, MuPDF, web browsers...), then yes!
This was implemented by @opposss in PR https://github.com/py-pdf/fpdf2/pull/1286
Please explain your intent Currently
fpdf2
supports 4 compression methods for images: https://github.com/py-pdf/fpdf2/blob/2.8.0/fpdf/image_parsing.py#L35The PDF standard specification (cf. PDF32000_2008.pdf section 7.4 Filters) defines several other compression filters, including
LZWDecode
.Recently, this filter was implemented by @MartinThoma in our companion library
pypdf
: https://github.com/py-pdf/pypdf/pull/2883Describe the solution you'd like Support
LZWDecode
for images compression.