Tiffany - Read/Write Multipage-Tiff with PIL without PIL
========================================================
Tiffany stands for any tiff. The tiny module solves a large set of
problems, has no dependencies and just works wherever Python works.
Tiffany was developed in the course of the *DiDoCa* project and will
always appear on PyPi.
Version 0.6.1
-------------
This version uses the new int.from_bytes/to_bytes methods from
python3.2 and emulates them on python2.6/2.7 . This migration
was tested using pytest.
Tiffany is quite unlikely to change anymore until user requests come,
or I get better test data:
Testing with larger tiff files
------------------------------
The implementation right now copies data in one big chunk. I would
like to make that better/not limited by memory. For that, I need
a tiff file that is a few megabytes big.
Can somebody please send me one?
Extending Tiffany?
------------------
I'm also thinking of
- an interface to Qt (without adding a dependency)
- a command line interface, to make tiffany into a new tiff tool,
- support for other toolkits that need to handle tiff files.
Ideas about this are most welcome.
Please let me know if this stuff works for you, and send requests to
<tis...@stackless.com> or use the links in the bitbucket website:
Christian Tismer <tis...@stackless.com> writes:
> Tiffany stands for any tiff. The tiny module solves a large set of
> problems, has no dependencies and just works wherever Python works.
> Tiffany was developed in the course of the *DiDoCa* project and will
> always appear on PyPi.
This sounds pretty neat. I didn't comment on it earlier because I
haven't tried it out, since I haven't had occasion to deal with tiff
files anytime recently. But I've had to process them for some projects
in the past, and tiffany would have been useful then. It's good to know
that it's out there.
> Christian Tismer <tis...@stackless.com> writes:
>> Tiffany stands for any tiff. The tiny module solves a large set of
>> problems, has no dependencies and just works wherever Python works.
>> Tiffany was developed in the course of the *DiDoCa* project and will
>> always appear on PyPi.
> This sounds pretty neat. I didn't comment on it earlier because I
> haven't tried it out, since I haven't had occasion to deal with tiff
> files anytime recently. But I've had to process them for some projects
> in the past, and tiffany would have been useful then. It's good to know
> that it's out there.
I've developed smc.freeimage exclusively to process large amounts of
TIFF images. I estimate that we have processed more than twelve million
unique TIFF images with about half a petabyte of data. The packages uses
Cython to wrap FreeImage (containing libtiff, libpng, libjpeg, libraw
and more) and LittleCMS2.
The package is mostly fitted to our needs, a bit limited (e.g. no
conversion of CMYK to RGB with color management) and doesn't follow
recent best practices for Cython code, but it does it job well. I need
to clean up the code base some day when more people get interested in
the lib.
> Christian Tismer <tis...@stackless.com> writes:
>> Tiffany stands for any tiff. The tiny module solves a large set of
>> problems, has no dependencies and just works wherever Python works.
>> Tiffany was developed in the course of the *DiDoCa* project and will
>> always appear on PyPi.
> This sounds pretty neat. I didn't comment on it earlier because I
> haven't tried it out, since I haven't had occasion to deal with tiff
> files anytime recently. But I've had to process them for some projects
> in the past, and tiffany would have been useful then. It's good to know
> that it's out there.
Meanwhile I got some feedback and test data.
(Thanks to Christian and Anthon)
It turns out to be a problem with multiple strips in a tiff file.
PIL does not support that. Maybe I can find an easy solution,
maybe I'm better off using
smc.freeimage
as suggested by Christian Heimes,
we will see. Right now I'm pretty exhaused after EuroPython...
cheers - chris
-- Christian Tismer :^) <mailto:tis...@stackless.com>
tismerysoft GmbH : Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/ 14482 Potsdam : PGP key -> http://pgp.uni-mainz.de work +49 173 24 18 776 mobile +49 173 24 18 776 fax n.a.
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
> It turns out to be a problem with multiple strips in a tiff file.
> PIL does not support that. Maybe I can find an easy solution,
> maybe I'm better off using
> smc.freeimage
> as suggested by Christian Heimes,
> we will see. Right now I'm pretty exhaused after EuroPython...
Yes, TIFF is a complex format. Even baseline TIFF has several ways to
store data (e.g. chunky or planar configuration, different settings for
stripes). PIL didn't support several features as well as bitonal
compression (G3, G4).
I'll clean up the code of smc.freeimage and release it on bitbucket over
the next couple of days.