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: ---8<--- ERROR: caught exception: Precondition violation! did not find a matching file type. (/wrkdirs/usr/ports/graphics/vigra/work/vigra-e6c21f3/src/impex/codecmanager.cxx:234) --->8--- 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 ---8<--- enblend: error opening output file "<panorama picture file>.png"; enblend: Precondition violation! did not find a matching codec for the given file extension (/wrkdirs/usr/ports/graphics/vigra/work/vigra-e6c21f3/src/impex/codecmanager.cxx:271) 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 --->8--- If either PNG or JPEG is selected instead, the blending, stitching and writing of the panorama image completes normally.
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.