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
This commit is contained in:
Jacob Boerema 2023-02-14 15:16:03 -05:00
parent 5f9415a641
commit 5ef77e6e8e
1 changed files with 4 additions and 4 deletions

View File

@ -181,8 +181,8 @@ ico_create_procedure (GimpPlugIn *plug_in,
"image/x-ico");
gimp_file_procedure_set_extensions (GIMP_FILE_PROCEDURE (procedure),
"ico");
gimp_file_procedure_set_magics (GIMP_FILE_PROCEDURE (procedure),
"0,string,\\0\\0\\1\\0");
/* We do not set magics here, since that interferes with certain types
of TGA images. */
gimp_load_procedure_set_thumbnail_loader (GIMP_LOAD_PROCEDURE (procedure),
LOAD_THUMB_PROC);
@ -211,8 +211,8 @@ ico_create_procedure (GimpPlugIn *plug_in,
"image/vnd.microsoft.icon");
gimp_file_procedure_set_extensions (GIMP_FILE_PROCEDURE (procedure),
"cur");
gimp_file_procedure_set_magics (GIMP_FILE_PROCEDURE (procedure),
"0,string,\\0\\0\\2\\0");
/* We do not set magics here, since that interferes with certain types
of TGA images. */
gimp_load_procedure_set_thumbnail_loader (GIMP_LOAD_PROCEDURE (procedure),
LOAD_THUMB_PROC);