diff --git a/core.d.ts b/core.d.ts index 38f0962c..3d464034 100644 --- a/core.d.ts +++ b/core.d.ts @@ -10,6 +10,7 @@ declare namespace core { | 'gif' | 'webp' | 'flif' + | 'xcf' | 'cr2' | 'cr3' | 'orf' @@ -146,6 +147,7 @@ declare namespace core { | 'image/gif' | 'image/webp' | 'image/flif' + | 'image/x-xcf' | 'image/x-canon-cr2' | 'image/x-canon-cr3' | 'image/tiff' diff --git a/core.js b/core.js index 5731afc5..80f97806 100644 --- a/core.js +++ b/core.js @@ -1051,6 +1051,13 @@ async function _fromTokenizer(tokenizer) { }; } + if (checkString('gimp xcf ')) { + return { + ext: 'xcf', + mime: 'image/x-xcf' + }; + } + // -- 12-byte signatures -- if (check([0x49, 0x49, 0x55, 0x00, 0x18, 0x00, 0x00, 0x00, 0x88, 0xE7, 0x74, 0xD8])) { diff --git a/fixture/fixture.xcf b/fixture/fixture.xcf new file mode 100644 index 00000000..1bd8af53 Binary files /dev/null and b/fixture/fixture.xcf differ diff --git a/package.json b/package.json index 4fc6ca25..bfe4297b 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "gif", "webp", "flif", + "xcf", "cr2", "cr3", "orf", diff --git a/readme.md b/readme.md index 41af7541..82e69aeb 100644 --- a/readme.md +++ b/readme.md @@ -278,6 +278,7 @@ Returns a set of supported MIME types. - [`gif`](https://en.wikipedia.org/wiki/GIF) - Graphics Interchange Format - [`webp`](https://en.wikipedia.org/wiki/WebP) - Web Picture format - [`flif`](https://en.wikipedia.org/wiki/Free_Lossless_Image_Format) - Free Lossless Image Format +- [`xcf`](https://en.wikipedia.org/wiki/XCF_(file_format)) - eXperimental Computing Facility - [`cr2`](https://fileinfo.com/extension/cr2) - Canon Raw image file (v2) - [`cr3`](https://fileinfo.com/extension/cr3) - Canon Raw image file (v3) - [`orf`](https://en.wikipedia.org/wiki/ORF_format) - Olympus Raw image file diff --git a/supported.js b/supported.js index 8913aacf..24151ddd 100644 --- a/supported.js +++ b/supported.js @@ -8,6 +8,7 @@ module.exports = { 'gif', 'webp', 'flif', + 'xcf', 'cr2', 'cr3', 'orf', @@ -144,6 +145,7 @@ module.exports = { 'image/gif', 'image/webp', 'image/flif', + 'image/x-xcf', 'image/x-canon-cr2', 'image/x-canon-cr3', 'image/tiff',