From: Tony Cook Date: Fri, 23 Nov 2018 00:14:43 +0000 (+1100) Subject: add probe support for FLIF files X-Git-Tag: v1.007~4 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/1facb3575fe6775d0176eb6fa0b74fa87df9042a add probe support for FLIF files (this doesn't add support for the file format, just detection of the file's "magic number") --- diff --git a/image.c b/image.c index cbd1b38a..3329003f 100644 --- a/image.c +++ b/image.c @@ -1716,6 +1716,9 @@ i_test_format_probe(io_glue *data, int length) { /* JPEG 2000 This might match a little loosely */ FORMAT_ENTRY("\x00\x00\x00\x0CjP \x0D\x0A\x87\x0A", "jp2"), + + /* FLIF - Free Lossless Image Format - https://flif.info/spec.html */ + FORMAT_ENTRY("FLIF", "flif") }; static const struct magic_entry more_formats[] = { /* these were originally both listed as ico, but cur files can diff --git a/t/200-file/100-files.t b/t/200-file/100-files.t index bc602f1c..a4c66a44 100644 --- a/t/200-file/100-files.t +++ b/t/200-file/100-files.t @@ -4,7 +4,7 @@ # the file format use strict; -use Test::More tests => 93; +use Test::More tests => 94; use Imager; -d "testout" or mkdir "testout"; @@ -287,6 +287,13 @@ probe_ok(<