From 3f4c27927673fa415517a8ec034d71a8a75df196 Mon Sep 17 00:00:00 2001 From: Jacob Boerema Date: Tue, 14 Feb 2023 15:36:13 -0500 Subject: [PATCH] plug-ins: disable magics detection for Windows CUR and ICO files The magics used for detection for CUR and ICO are not very unique and interfere with the detection of certain types of TGA images. Since these TGA images are regularly used, it seems better to only base CUR and ICO detection on the extension, just as we do with TGA version 1 files. See also issue #7912 --- plug-ins/file-ico/ico.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plug-ins/file-ico/ico.c b/plug-ins/file-ico/ico.c index c74aecd60a..6c15c22add 100644 --- a/plug-ins/file-ico/ico.c +++ b/plug-ins/file-ico/ico.c @@ -107,10 +107,11 @@ query (void) load_args, load_return_vals); gimp_register_file_handler_mime (LOAD_PROC, "image/x-ico"); - gimp_register_magic_load_handler (LOAD_PROC, - "ico", - "", - "0,string,\\000\\001\\000\\000,0,string,\\000\\002\\000\\000"); + /* We do not set magics here, since that interferes with certain types + of TGA images. */ + gimp_register_load_handler (LOAD_PROC, + "ico", + ""); gimp_install_procedure (LOAD_THUMB_PROC, "Loads a preview from an Windows ICO file",