diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
commit | 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /third_party/jpeg-xl/plugins/mime | |
parent | Initial commit. (diff) | |
download | firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/plugins/mime')
-rw-r--r-- | third_party/jpeg-xl/plugins/mime/CMakeLists.txt | 6 | ||||
-rw-r--r-- | third_party/jpeg-xl/plugins/mime/README.md | 37 | ||||
-rw-r--r-- | third_party/jpeg-xl/plugins/mime/image-jxl.xml | 13 |
3 files changed, 56 insertions, 0 deletions
diff --git a/third_party/jpeg-xl/plugins/mime/CMakeLists.txt b/third_party/jpeg-xl/plugins/mime/CMakeLists.txt new file mode 100644 index 0000000000..6f2a0f919c --- /dev/null +++ b/third_party/jpeg-xl/plugins/mime/CMakeLists.txt @@ -0,0 +1,6 @@ +# Copyright (c) the JPEG XL Project Authors. All rights reserved. +# +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +install(FILES image-jxl.xml DESTINATION share/mime/packages/) diff --git a/third_party/jpeg-xl/plugins/mime/README.md b/third_party/jpeg-xl/plugins/mime/README.md new file mode 100644 index 0000000000..4d398c7b90 --- /dev/null +++ b/third_party/jpeg-xl/plugins/mime/README.md @@ -0,0 +1,37 @@ +## :warning: Not needed anymore + +As `image/jxl` is now supported by [shared-mine-info 2.2](https://gitlab.freedesktop.org/xdg/shared-mime-info/-/releases/2.2), it should not be necessary anymore to install this plugin. + +You can test if your system correctly understand the MIME type of JPEG XL image by obtaining a JPEG XL image, e.g. with +```bash +wget https://raw.githubusercontent.com/libjxl/conformance/master/testcases/bicycles/input.jxl +``` +and with that sample JPEG XL file `input.jxl` (or any other valid JPEG XL file), run any of the following commands: +```bash +xdg-mime query filetype input.jxl +file --mime-type input.jxl +mimetype input.jxl +``` +If the output contains `image/jxl` you are all set! + + +## JPEG XL MIME type + +If not already installed by the [Installing section of BUILDING.md](../../BUILDING.md#installing), then it can be done manually: + +### Install +```bash +sudo xdg-mime install --novendor image-jxl.xml +``` + +Then run: +``` +update-mime --local +``` + + +### Uninstall +```bash +sudo xdg-mime uninstall image-jxl.xml +``` + diff --git a/third_party/jpeg-xl/plugins/mime/image-jxl.xml b/third_party/jpeg-xl/plugins/mime/image-jxl.xml new file mode 100644 index 0000000000..cab9018c7d --- /dev/null +++ b/third_party/jpeg-xl/plugins/mime/image-jxl.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> + <mime-type type="image/jxl"> + <comment>JPEG XL image</comment> + <comment xml:lang="fr">image JPEG XL</comment> + <comment xml:lang="nl">JPEG XL afbeelding</comment> + <magic priority="50"> + <match type="string" offset="0" value="\xFF\x0A"/> + <match type="string" offset="0" value="\0\0\0\x0CJXL \x0D\x0A\x87\x0A"/> + </magic> + <glob pattern="*.jxl"/> + </mime-type> +</mime-info> |