FLIF file format support

Started by Marsu42, October 07, 2016, 06:07:37 PM

Previous topic - Next topic

Marsu42

If you have nothing to do and would like add another new promising file format to the zoo - here you go :-)

It's FLIF, designed for lossless compression, and my test just now on some of my photography shows that it indeed has smaller filesizes than the current competition. Plus it's oss and (supposed to be) patent free, thus supporting it would be a show of faith itself. FLIF supports icc, exif and xmp - and as it's actively developed so the dev should be open to communication (unlike bpg or xr).

http://flif.info/
https://pyra-handheld.com/boards/threads/free-lossless-image-format-flif.76305/
https://github.com/FLIF-hub/FLIF
https://uprootlabs.github.io/poly-flif/

Edit: If you don't want to be first, don't worry, FLIF is even featured in ImageMagick and mainstream viewers like XnView by now.

Phil Harvey

Thanks for the suggestion.  Do you have any flif samples with the various types of metadata?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Marsu42

Quote from: Phil Harvey on October 08, 2016, 10:20:15 AM
Do you have any flif samples with the various types of metadata?

I've converted a png with xmp metadata ("-xmp-dc:Creator") and exif ("-ExifIFD:UserComent") to flif, it's attached. On conversion back to png, the exif data is lost and the xmp is garbled - so there's no telling if the metadata in the flif file is like it's supposed to be. Conversion with an icc profile fails completely.

However, I've asked the author of flif to get back to you and provide you with some samples that he knows are correct and the spec (if there is somehting like this for flif metadata atm): https://pyra-handheld.com/boards/threads/free-lossless-image-format-flif.76305/page-16#post-1394815

Phil Harvey

I have added preliminary support for reading FLIF metadata, but the inflating the data from the EXIF and XMP boxes of your samples images fails due to a Zlib "data error".  So it looks to me as if the deflated stream is not right.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

OK, i've figured this out and have just released ExifTool 10.30 with FLIF support.

The decoding problem was because FLIF doesn't include the Zlib header and checksum when it stores the deflated metadata block.  So I had to do a raw inflate instead of being able to use Zlib.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Marsu42

Quote from: Phil Harvey on October 13, 2016, 11:33:50 AM
OK, i've figured this out and have just released ExifTool 10.30 with FLIF support.

Great thanks, 10.31 even includes write support :-) so let's hope the author keeps working on flif and finalizes the bitstream sooner or later b/c it could be possible that upcoming releases break the metadata support again.