libjxl: Modular encoder fails for tall/wide images
convert -size 15x167941 xc: tall.png
# if fails, update /etc/ImageMagick-6/policy.xml
./build/tools/cjxl ./tall.png ./tall.jxl
# OK
./build/tools/cjxl -m 1 ./tall.png ./tall.jxl
# Fails
Error:
JPEG XL encoder v0.12.0 538c140d [AVX2,SSE4,SSE2]
Encoding [Modular, d1.000, effort: 7]
lib/jxl/modular/encoding/encoding.cc:523: JXL_FAILURE: Inconsistent transforms
lib/jxl/enc_modular.cc:1036: JXL_RETURN_IF_ERROR code=1: ValidateChannelDimensions(gi, stream_options_[0])
lib/jxl/enc_frame.cc:1612: JXL_RETURN_IF_ERROR code=1: enc_modular.ComputeEncodingData( frame_header, metadata->m, &color, extra_channels, group_rect, frame_dim, frame_area_rect, &enc_state, cms, pool, aux_out, cparams.modular_mode)
lib/jxl/enc_frame.cc:2125: JXL_RETURN_IF_ERROR code=1: ComputeEncodingData( cparams, frame_info, metadata, frame_data, jpeg_data.get(), 0, 0, frame_data.xsize, frame_data.ysize, cms, pool, frame_header, enc_modular, enc_state, &group_codes, aux_out)
lib/jxl/encode.cc:999: Failed to encode frame
JxlEncoderProcessOutput failed.
EncodeImageJXL() failed.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15 (13 by maintainers)
To stay on the safe side, I’ll currently leave decoder as-is. It still does
ValidateChannelDimensionsto catch the problem (after MetaApply, so we only pay with memory allocations, and only in case of “invalid” stream).Testing encoder PR. Will publish soon.