Skip to content

xapp-jxl-thumbnailer forces djxl --bits_per_sample 16, causing thumbnail generation to fail with libjxl 0.7.0 #207

Description

@Redsandro

Distribution

Mint 22.3

Package version

3.2.2+zena

Graphics hardware in use

No response

Frequency

Always

Bug description

Jpeg XL .jxl image/jxl image thumbnails do not work in Linux Mint, desktop, Nemo, etc. because xapp-jxl-thumbnailer uses a failing command.

/usr/bin/xapp-jxl-thumbnailer:

try:
    with tempfile.NamedTemporaryFile(dir=XApp.get_tmp_dir(), suffix=".png") as tempf:
        output = subprocess.check_output([
            "djxl", "--bits_per_sample", "16", "--num_threads", "1", "--quiet", t.args.input, tempf.name
        ])

Steps to reproduce

  1. Create a JXL:
cjxl image.png image.jxl
  1. Verify djxl works:
djxl image.jxl out.png
  1. Verify command from /usr/bin/xapp-jxl-thumbnailer fails:
djxl --bits_per_sample 16 image.jxl out16.png
# ./lib/extras/enc/encode.cc:62: JXL_FAILURE: Bit depth does not fit pixel data type
# ./lib/extras/enc/apng.cc:201: JXL_RETURN_IF_ERROR code=1: VerifyPackedImage(frame.color, ppf.info)
# Encode failed

Expected behavior

Free thumbnails

Additional information

Workaround

try:
    with tempfile.NamedTemporaryFile(dir=XApp.get_tmp_dir(), suffix=".png") as tempf:
        output = subprocess.check_output([
-            "djxl", "--bits_per_sample", "16", "--num_threads", "1", "--quiet", t.args.input, tempf.name
+            "djxl", "--num_threads", "1", "--quiet", t.args.input, tempf.name
        ])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions