Bug 228547 - graphics/hugin doesn't handle PNG images
Summary: graphics/hugin doesn't handle PNG images
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Greg Lehey
Depends on:
Reported: 2018-05-27 16:30 UTC by a.parseg
Modified: 2018-05-31 03:13 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (grog)


Note You need to log in before you can comment on or make changes to this bug.
Description a.parseg 2018-05-27 16:30:09 UTC
Running Hugin version 2018.0.0.5abfb4de7961 from packages on 
FreeBSD 11.1-RELEASE-p9 (I have noticed the problem since whatever versions were current as of december 2017).

In Hugin's Assistant tab, trying to load PNGs fails with the dialog : "Unsupported image file format | Could not decode image: <first of the selected files>.png. Abort".

Launching from the command line, the following appears:
ERROR: caught exception: 
Precondition violation!
did not find a matching file type.

Loading the same files converted (with imagemagick's 'convert') to TIFF or JPEG, with exif tags copied using exiftool, works normally and the images are successfully aligned and processed.

Once the images are aligned, from the Assistant tab's "Create Panorama"  button the 'Output parameters' dialog is shown, offering under 'Size and file format' the option to output to PNG, JPEG or TIFF.

If the PNG format is selected, the panorama creation process starts normally, but fails when blending the images; the 'Status report' window ends on 
enblend: error opening output file "<panorama picture file>.png";
Precondition violation!
did not find a matching codec for the given file extension

enblend: info: remove invalid output image "<panorama picture file>.png"
enblend: warning: could not remove invalid output image "<panorama picture file>.png": No such file or directory
If either PNG or JPEG is selected instead, the blending, stitching and writing of the panorama image completes normally.
Comment 1 Greg Lehey freebsd_committer 2018-05-31 03:13:19 UTC
Problem confirmed. This is a bug in the graphics/vigra package, which for some reason doesn't currently include PNG support. See bug 228623. Until the problem has been fixed and a new package has been created, you can work around the problem by removing the vigra package and building from the port (/usr/ports/graphics/vigra).  No options are needed, though it would be a good idea to run 'make config' to confirm that PNG support is included in the build.