Skip to content

unexpexted result of converting from grayscale jxl #5836

@multiSnow

Description

@multiSnow

ImageMagick version

7.1.0-53

Operating system

Linux

Operating system, version and so on

linux 6.0.8 amd64

Description

Result converted from grayscale jxl file is corrupted (compared with the result converted by djxl).

(result of RGB jxl is correct.)

Steps to Reproduce

generate a grayscale image in png format by imagemagick:

$ magick -size 100x60 xc:gray -fill white -stroke black \
       -draw "roundrectangle 20,10 80,50 20,15" test.png

the png image is in grayscale color:

$ identify test.png
test.png PNG 100x60 100x60+0+0 16-bit Grayscale Gray 1216B 0.000u 0:00.000

convert it (losslessly) into jxl format with the reference tools from libjxl:

$ cjxl test.png out.jxl --quality=100

the jxl image is also in grayscale color:

$ jxlinfo out.jxl
JPEG XL file format container (ISO/IEC 18181-2)
JPEG XL image, 100x60, (possibly) lossless, 16-bit Grayscale
Color space: Grayscale, D65, gamma(0.454550) transfer function, rendering intent: Relative

then, convert back to png format:

$ mogrify -format png out.jxl

Images

test.png, the grayscale png format image generated by magick:
test
out.png, the grayscale png format image converted from jxl format by mogrify:
out

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