libpano13 patch for missing ExtraSamples TIFF metadata

51 views
Skip to first unread message

Kevin Mehall

unread,
May 13, 2022, 2:37:51 AM5/13/22
to hugin and other free panoramic software

libpano13 writes TIFF files with an alpha channel, but without the required ExtraSamples TIFF metadata tag indicating that the 4th channel is alpha.

With the incorrect metadata, applications based on libtiff (e.g. tiffinfo) print a warning when opening a file created by PTUncrop:

TIFFReadDirectory: Warning, Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples..

Pillow 9.1.0 (Python library) fails to load these images, though this has been fixed.

I couldn't figure out where libpano13's authoritative source repository is, or how to submit a pull request or equivalent, so I've attached the patch against libpano13 v2.9.21 here.

libpano13-tiff-extrasamples.patch

johnfi...@gmail.com

unread,
May 13, 2022, 10:43:24 AM5/13/22
to hugin and other free panoramic software
On Friday, May 13, 2022 at 2:37:51 AM UTC-4 kevin....@gmail.com wrote:

I couldn't figure out where libpano13's authoritative source repository is, or how to submit a pull request or equivalent, so I've attached the patch against libpano13 v2.9.21 here.

The project is here:

Under the "mercurial" tab that page links to

That page lets you browse the code and it gives the command for cloning the repository:
hg clone http://hg.code.sf.net/p/panotools/libpano13 panotools-libpano13

I don't know how to submit a pull request.  But you asked in the right place and I expect the maintainers will either accept the patch you posted or give instructions.
If someone silently applies your patch (without replying here) the above links will let you see that.

I am one of two maintainers of a fork of libpano13.  I'll wait at least a few days for action in the official version and then examine your patch for inclusion in the fork.

T. Modes

unread,
May 13, 2022, 11:34:21 AM5/13/22
to hugin and other free panoramic software
Hi Kevin,

kevin.... schrieb am Freitag, 13. Mai 2022 um 08:37:51 UTC+2:

libpano13 writes TIFF files with an alpha channel, but without the required ExtraSamples TIFF metadata tag indicating that the 4th channel is alpha.

With the incorrect metadata, applications based on libtiff (e.g. tiffinfo) print a warning when opening a file created by PTUncrop:

TIFFReadDirectory: Warning, Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples..


Thanks for the patch. You are right with your diagnose. I committed the changes to the repository. John has already given the links.

Thomas

Reply all
Reply to author
Forward
0 new messages