[gimp/gimp-2-10] Issue #2209: HEIF: Invalid input: No 'ftyp' box.



commit e76d0941a9e7d549e8ff2f8b2e37b8163df14d38
Author: Jehan <jehan girinstud io>
Date:   Fri Sep 14 17:30:14 2018 +0200

    Issue #2209: HEIF: Invalid input: No 'ftyp' box.
    
    Adding a magic number for HEIC/HEIF, which would allow to discard
    obvious non-HEIC images even with the wrong extension.
    
    Note: it looks like this magic number would also match more generically
    other ISO base media file format (ISOBMFF) formats, like .mov or .mp4
    files. I am enquiring for better magic but for now, this is better than
    nothing.
    
    (cherry picked from commit d738d2f645abe16457311389b8827ecd80ca71da)

 plug-ins/common/file-heif.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/plug-ins/common/file-heif.c b/plug-ins/common/file-heif.c
index 3af58f5ff5..39c8879de5 100644
--- a/plug-ins/common/file-heif.c
+++ b/plug-ins/common/file-heif.c
@@ -120,6 +120,10 @@ query (void)
   gimp_register_load_handler (LOAD_PROC, "heic,heif", "");
   gimp_register_file_handler_mime (LOAD_PROC, "image/heif");
   gimp_register_file_handler_uri (LOAD_PROC);
+  gimp_register_magic_load_handler (LOAD_PROC,
+                                    "heif,heic",
+                                    "",
+                                    "4,string,ftyp");
 
   gimp_install_procedure (SAVE_PROC,
                           _("Exports HEIF images"),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]