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
eric@136 | 1 | tumble: build a PDF file from image files |
eric@136 | 2 | Copyright 2003 Eric Smith <eric@brouhaha.com> |
eric@136 | 3 | $Id: INSTALL,v 1.1 2003/03/16 07:37:16 eric Exp $ |
eric@136 | 4 | |
eric@136 | 5 | Tumble requires libtiff, which in turn requires libjpeg and libz: |
eric@136 | 6 | |
eric@136 | 7 | http://www.libtiff.org/ |
eric@136 | 8 | http://www.???.org */ |
eric@136 | 9 | |
eric@136 | 10 | Building Tumble requires GNU Make, GCC, Bison, and Flex, all of which are |
eric@136 | 11 | free software provided by the Free Software Foundation. These are provided |
eric@136 | 12 | as part of most Linux distributions, and are also avaiable for many other |
eric@136 | 13 | operatng systems. See the FSF web site for more information |
eric@136 | 14 | |
eric@136 | 15 | http://www.gnu.org/ |
eric@136 | 16 | |
eric@136 | 17 | The supplied Makefile should work on most systems with only minor |
eric@136 | 18 | modifications. |