Open BigTIFF (64-bit) files using the custom TIFF loader.
authorMartin Pelikán <mpel@google.com>
Sat, 3 Dec 2016 11:53:50 +0000 (22:53 +1100)
committerKlaus Ethgen <Klaus@Ethgen.de>
Sat, 3 Dec 2016 13:42:31 +0000 (14:42 +0100)
In the worst case, old libtiff versions will return a different error.
See http://www.awaresystems.be/imaging/tiff/bigtiff.html for more info.

src/image-load.c

index 0a4cda6..bafc16c 100644 (file)
@@ -614,6 +614,8 @@ static void image_loader_setup_loader(ImageLoader *il)
 #ifdef HAVE_TIFF
        if (il->bytes_total >= 10 &&
            (memcmp(il->mapped_file, "MM\0*", 4) == 0 ||
+            memcmp(il->mapped_file, "MM\0+\0\x08\0\0", 8) == 0 ||
+            memcmp(il->mapped_file, "II+\0\x08\0\0\0", 8) == 0 ||
             memcmp(il->mapped_file, "II*\0", 4) == 0))
                {
                DEBUG_1("Using custom tiff loader");