From cd3333c6d3f255d1950b9f2e8d627e08e49eea48 Mon Sep 17 00:00:00 2001 From: Jehan Date: Sun, 4 Apr 2021 15:44:26 +0200 Subject: [PATCH] meson, configure, plug-ins: image/x-sun-raster is a supported MimeTypes. Also ".sun" is a possible (and common) file name extension for Sun Raster images, according to various sources and samples I found (these samples with .sun extension also opened fine in GIMP, so it's not just a subvariant which we may not handle or something of the sort). This one is not so important though as we also register magic bytes for detection (which is the proper way), but it can still be useful, mostly for exporting (as we will direct to the SunRaster plug-in if someone tried to export a file with .sun extension, since no other file format uses this extension AFAICS). There is no functional change, I just had a look at this plug-in while handling !428 and realized this format was not present in the MimeType list (which is used to generate the desktop file, in order to have proper mime types, not detection based on extension only, unlike Windows in !428). --- configure.ac | 2 +- meson.build | 1 + plug-ins/common/file-sunras.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 96578a322a..4be87d186d 100644 --- a/configure.ac +++ b/configure.ac @@ -1448,7 +1448,7 @@ AC_SUBST(GIMP_COMMAND) # The list of MIME types that are supported by plug-ins that are compiled # unconditionally: -MIME_TYPES="image/bmp;image/g3fax;image/gif;image/x-fits;image/x-pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf;image/x-gimp-gbr;image/x-gimp-pat;image/x-gimp-gih" +MIME_TYPES="image/bmp;image/g3fax;image/gif;image/x-fits;image/x-pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf;image/x-gimp-gbr;image/x-gimp-pat;image/x-gimp-gih;image/x-sun-raster" ################# # Bundle packages diff --git a/meson.build b/meson.build index 4650bedb00..b2332fb356 100644 --- a/meson.build +++ b/meson.build @@ -640,6 +640,7 @@ MIMEtypes = [ 'image/x-portable-pixmap', 'image/x-psd', 'image/x-sgi', + 'image/x-sun-raster', 'image/x-tga', 'image/x-xbitmap', 'image/x-xcf', diff --git a/plug-ins/common/file-sunras.c b/plug-ins/common/file-sunras.c index 8e88a2a1a3..30f3a3d2bc 100644 --- a/plug-ins/common/file-sunras.c +++ b/plug-ins/common/file-sunras.c @@ -282,7 +282,7 @@ sunras_create_procedure (GimpPlugIn *plug_in, gimp_file_procedure_set_mime_types (GIMP_FILE_PROCEDURE (procedure), "image/x-sun-raster"); gimp_file_procedure_set_extensions (GIMP_FILE_PROCEDURE (procedure), - "im1,im8,im24,im32,rs,ras"); + "im1,im8,im24,im32,rs,ras,sun"); gimp_file_procedure_set_magics (GIMP_FILE_PROCEDURE (procedure), "0,long,0x59a66a95"); } @@ -311,7 +311,7 @@ sunras_create_procedure (GimpPlugIn *plug_in, gimp_file_procedure_set_mime_types (GIMP_FILE_PROCEDURE (procedure), "image/x-sun-raster"); gimp_file_procedure_set_extensions (GIMP_FILE_PROCEDURE (procedure), - "im1,im8,im24,im32,rs,ras"); + "im1,im8,im24,im32,rs,ras,sun"); GIMP_PROC_ARG_BOOLEAN (procedure, "rle", "RLE",