Mon, 14 Dec 2009 15:51:53 +0000
Patched to add PNG and JP2 support.
Created-By: Daniel Glöckner <daniel-gl at gmx.net>
The attached patch adds PNG and JP2 support to tumble.
PNG:
As the deflated data is directly copied into the PDF, there are some
limitations to the list of supported images:
- bit depth <= 8
- no alpha channel
- no interlace
JP2:
The PDF Reference says JP2 is just a subset of the allowed JPX
format. I don't have a copy of the official standard, so I don't know
what to change to cover JPXes as well.
You'll need the Adobe Acrobat Reader 6 to display those images.
Xpdf and Ghostscript are missing the ColorSpace key in the image
dictionary, which is optional for JPXDecode and IMHO not just a matter
of a few lines of code.
One thing left to do is to change the PDF version to 1.5 if a JP2 file
has been given to tumble - maybe using the Version key in the Catalog
if seeking is not possible.
Using the resolution info in a JP2 (resc/resd boxes) is implemented but
untested. Jasper doesn't write those boxes.
I had to change the string handling to allow black in PNG palettes.
And there was a double free in tumble_input.c which happens when not
using control files.
Daniel
convert-repo@165 | 1 | 129e16d9b5f468fd37a688f0c6cbb245bc024fe6 REL_0_22 |
convert-repo@165 | 2 | 17531d20e47739c2463620e193150947c783b4cf REL_0_31 |
convert-repo@165 | 3 | 3398476bbeddb7926a7a17a7678bf7933f45e1f6 REL_0_10 |
convert-repo@165 | 4 | 3401fe143d49055fbdcf47aa61ddb92d8af9050b REL_0_25 |
convert-repo@165 | 5 | 692e6411df52f0870f4620e99ec49457e91bd3f9 REL_0_28 |
convert-repo@165 | 6 | 6f9b00c7b0763fdc0b4d1836bd7e5fddc9f95ceb REL_0_21 |
convert-repo@165 | 7 | 745483d1521530ab407a9ff6829764b92f70590a REL_0_32 |
convert-repo@165 | 8 | 76c197fe2eebe681459b28fc28f1d53fad0d6256 REL_0_27 |
convert-repo@165 | 9 | ab2409bdaa8c2ff6ac58cee135e58b22d1acf410 REL_0_26 |
convert-repo@165 | 10 | ba64dfca82e94c93be277f87125b6571afacd27b REL_0_23 |
convert-repo@165 | 11 | d0ff99135a39a2c5ebfeaa6c115ffac5ce005401 release-0.33 |
convert-repo@165 | 12 | d9a9ee9ff0989f180a52823d9646e24328cb6f12 REL_0_20 |
convert-repo@165 | 13 | e2ef1c2f9ecac759d8b9e755ee5f195f1651be0b REL_0_24 |
convert-repo@165 | 14 | f8d933b354f764add0befda7e074d2c698acd23e REL_0_29 |