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