issue_owner_repo listlengths 2 2 | issue_body stringlengths 0 262k ⌀ | issue_title stringlengths 1 1.02k | issue_comments_url stringlengths 53 116 | issue_comments_count int64 0 2.49k | issue_created_at stringdate 1999-03-17 02:06:42 2025-06-23 11:41:49 | issue_updated_at stringdate 2000-02-10 06:43:57 2025-06-23 11:43:00 | issue_html_url stringlengths 34 97 | issue_github_id int64 132 3.17B | issue_number int64 1 215k |
|---|---|---|---|---|---|---|---|---|---|
[
"libjxl",
"libjxl"
] | Hello,
I have trouble to decode this JXL animation (found on Discord, encoded from APNG by DZgas using cjxl) in my software using libjxl 0.11.1:
http://188.121.162.14/jxl/movie_experiment01.jxl
```
jxlinfo movie_experiment01.jxl
JPEG XL animation, 128x64, lossy, 8-bit RGB
Color space: RGB, D65, sRGB primaries, 709 transfer function, rendering intent: Relative
frame: full image size, duration: 3500.0 ms
frame: full image size, duration: 500.0 ms
```
I use `JxlEncoderSetColorEncoding` API to get sRGB output.
Few frames are decoded successfully, however at some point the decoding stops with following errors printed (when waiting for JXL_DEC_FULL_IMAGE event):
```
./lib/jxl/render_pipeline/stage_blending.cc:78: JXL_FAILURE: Blending in unsupported color space
./lib/jxl/render_pipeline/render_pipeline.h:95: JXL_RETURN_IF_ERROR code=1: stage->IsInitialized()
./lib/jxl/dec_frame.cc:663: JXL_RETURN_IF_ERROR code=1: dec_state_->PreparePipeline( frame_header_, &frame_header_.nonserialized_metadata->m, decoded_, pipeline_options)
./lib/jxl/decode.cc:1127: frame processing failed
```
I can see that frames will full image size works fine. However, the partial(not full image size) frames are causing problems. There are such frames in the animation:
```
frame: full image size, duration: 1000.0 ms
frame: 76x9 at position (22,27), duration: 8500.0 ms
frame: 1x1 at position (0,0), duration: 3000.0 ms
frame: 82x64 at position (20,0), duration: 500.0 ms
frame: 90x64 at position (16,0), duration: 1000.0 ms
frame: 110x64 at position (0,0), duration: 1000.0 ms
frame: 100x64 at position (14,0), duration: 500.0 ms
frame: 118x64 at position (2,0), duration: 500.0 ms
```
The code in `lib/jxl/render_pipeline/stage_blending.cc`
https://github.com/libjxl/libjxl/blob/794a5dcf0d54f9f0b20d288a12e87afb91d20dfc/lib/jxl/render_pipeline/stage_blending.cc#L77
suggests that when color conversion is requested (that's what happens when JxlEncoderSetColorEncoding is used), blending of incomplete frames fails.
I'd like that JxlEncoderSetColorEncoding would work together with animations like the movie_experiment01.jxl in the future. | Error to decode some JXL animations when JxlEncoderSetColorEncoding is used | https://api.github.com/repos/libjxl/libjxl/issues/3983/comments | 0 | 2024-11-29T10:30:47Z | 2024-11-29T10:30:47Z | https://github.com/libjxl/libjxl/issues/3983 | 2,704,666,333 | 3,983 |
[
"libjxl",
"libjxl"
] | I'm unable to compile libjxl on MacOS, can someone give me detailed instructions? | I'm unable to compile libjxl on MacOS, can someone give me detailed instructions? | https://api.github.com/repos/libjxl/libjxl/issues/3980/comments | 7 | 2024-11-28T13:39:19Z | 2024-11-28T15:42:27Z | https://github.com/libjxl/libjxl/issues/3980 | 2,702,212,471 | 3,980 |
[
"libjxl",
"libjxl"
] | Command:
```
./build/tools/cjxl ~/dropbox/image1.jpg --disable_output --allow_expert_options --lossless_jpeg=1 -m 1 -d 0 --effort=11
```
Result:
```
JPEG XL encoder v0.12.0 b9e1c089 [AVX2,SSE4,SSE2]
Encoding [JPEG, lossless transcode, effort: 11]
JxlEncoderProcessOutput failed.
EncodeImageJXL() failed.
``` | Lossless JPEG transcoding fails for effort=11 | https://api.github.com/repos/libjxl/libjxl/issues/3977/comments | 2 | 2024-11-28T11:15:43Z | 2024-12-11T15:46:28Z | https://github.com/libjxl/libjxl/issues/3977 | 2,701,806,071 | 3,977 |
[
"libjxl",
"libjxl"
] | Here:
https://github.com/libjxl/libjxl/blob/b9e1c0897e75390f07f0a103fe0cc79ee0789f41/doc/format_overview.md?plain=1#L219
indicate that we can permut scanlines order. I wander know how to modify the order? (e.g. left to right, top to bottom)
Thanks.
| Scanlines order request | https://api.github.com/repos/libjxl/libjxl/issues/3974/comments | 2 | 2024-11-28T07:17:32Z | 2024-12-12T02:22:30Z | https://github.com/libjxl/libjxl/issues/3974 | 2,701,092,110 | 3,974 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When running
`cjxl [attached imaged.png] [attached imaged.jxl]`
I get this \/
```
JPEG XL encoder v0.11.1 794a5dc [SSE2]
Getting pixel data failed.
```
**To Reproduce**
Steps to reproduce the behavior:
cjxl [attached imaged.png] [attached imaged.jxl]
**Expected behavior**
A clear and concise description of what you expected to happen.
**Environment**
- OS: w7 64 bit 7601
- Compiler version: got it from releases page
- CPU type: i5-2400
- cjxl/djxl version string: JPEG XL encoder v0.11.1 794a5dc [SSE2]
**Additional context**
Add any other context about the problem here.
**The image is slightly sexy so NSFW**
Spoilered it ,use the url in details.
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
<details>

</details> | Getting pixel data failed. | https://api.github.com/repos/libjxl/libjxl/issues/3973/comments | 3 | 2024-11-27T19:17:25Z | 2025-04-27T02:46:33Z | https://github.com/libjxl/libjxl/issues/3973 | 2,699,563,408 | 3,973 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
when I use cjxl to convert a 8/16-bit Prophoto PNG to JXL, the generated JXL image is with sRGB color space instead of preserving the ProPhoto color space.
**To Reproduce**
(1) cjx input.png output.jxl
but if I do "cjxl input.png output.jxl -q 100", the generated jxl image is with the ProPhoto color space.
**Expected behavior**
For lossy conversion from PNG to JXL, the generated JXL should preserve the original ProPhoto color space.
**Screenshots**
If applicable, add screenshots or example input/output images to help explain your problem.
**Environment**
- OS: MacOS 15.1.1
- Compiler version:
- CPU type: Apple Silicon M1
- cjxl/djxl version string: 0.11
**Additional context**
Add any other context about the problem here.
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| ProPhoto is converted to sRGB color space | https://api.github.com/repos/libjxl/libjxl/issues/3966/comments | 3 | 2024-11-26T18:00:13Z | 2024-12-11T17:20:41Z | https://github.com/libjxl/libjxl/issues/3966 | 2,695,622,232 | 3,966 |
[
"libjxl",
"libjxl"
] | ```
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.
``` | Modular encoder fails for tall/wide images | https://api.github.com/repos/libjxl/libjxl/issues/3937/comments | 4 | 2024-11-18T14:51:34Z | 2025-04-27T02:45:43Z | https://github.com/libjxl/libjxl/issues/3937 | 2,668,835,478 | 3,937 |
[
"libjxl",
"libjxl"
] | Hey!
I wanted to use JXL animation as an additional compression tool as my jxl files have great temporal consistency. I successfully encoded a file with frames without timecodes, but resulting image weighs 96166 bytes even though each individual frame weigh 197 bytes and I encoded same frame 4 times into the same encoder. Is it a known behaviour or an issue of chosen parameters?
Mine are the following:
```
basic_info.have_animation = num_frames > 1 ? JXL_TRUE : JXL_FALSE;
if (basic_info.have_animation) {
basic_info.animation.tps_numerator = 1000; // Set to 30 FPS
basic_info.animation.tps_denominator = 1;
basic_info.animation.num_loops = 0; // Infinite loops
basic_info.animation.have_timecodes = JXL_FALSE;
}
```
```
// Add frame options for better animation compression
if (num_frames > 1) {
// Enable patches for better frame-to-frame compression
JxlEncoderFrameSettingsSetOption(frame_settings,
JXL_ENC_FRAME_SETTING_PATCHES, JXL_TRUE);
// Enable adaptive quantization for better compression
JxlEncoderFrameSettingsSetOption(frame_settings,
JXL_ENC_FRAME_SETTING_RESPONSIVE, 1);
// Group order: -1 = choose automatically based on image size
JxlEncoderFrameSettingsSetOption(frame_settings,
JXL_ENC_FRAME_SETTING_GROUP_ORDER, -1);
// Modular mode: 0 = VarDCT (better for photographs)
// 1 = Modular (better for synthetic images)
JxlEncoderFrameSettingsSetOption(frame_settings,
JXL_ENC_FRAME_SETTING_MODULAR, 1);
// Optional: Noise synthesis level (0-4)
// Lower values = higher quality but larger file size
JxlEncoderFrameSettingsSetOption(frame_settings,
JXL_ENC_FRAME_SETTING_PHOTON_NOISE, 4);
}
size_t frame_size = xsize * ysize * num_channels * pixel_size;
for (size_t i = 0; i < num_frames; i++) {
uint8_t* frame_pixels = static_cast<uint8_t*>(pixels) + (i * frame_size);
JxlEncoderStatus status = JxlEncoderAddImageFrame(frame_settings, &pixel_format,
frame_pixels, frame_size);
if (status != JXL_ENC_SUCCESS) {
throw std::runtime_error("JxlEncoderAddImageFrame failed");
}
}
``` | Animation weighs more than N individual JXL files | https://api.github.com/repos/libjxl/libjxl/issues/3936/comments | 3 | 2024-11-16T13:01:00Z | 2024-11-18T18:11:25Z | https://github.com/libjxl/libjxl/issues/3936 | 2,664,277,034 | 3,936 |
[
"libjxl",
"libjxl"
] | On 25.09.2024 GIMP package has been removed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078402
On 15.11.2024 it is still missing.
PR that disables `debian:trixie` build: #3934 | Enable debian:trixie build once GIMP package is back | https://api.github.com/repos/libjxl/libjxl/issues/3935/comments | 0 | 2024-11-15T13:55:13Z | 2024-11-15T13:55:14Z | https://github.com/libjxl/libjxl/issues/3935 | 2,662,053,835 | 3,935 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When trying
cjxl attached_file 1.jxl -d 3
it crashes
**To Reproduce**
Steps to reproduce the behavior:
cjxl attached_file 1.jxl -d 3
**Expected behavior**
Converts successfully.
**Screenshots**
If applicable, add screenshots or example input/output images to help explain your problem.
**Environment**
- OS: win 7 64bit
- Compiler version: [e.g. clang 11.0.1]
- CPU type: i5-2400
- cjxl/djxl version string: JPEG XL encoder v0.11.0 4df1e9e [SSE2]
**Additional context**
Add any other context about the problem here.**The pic is slightly sexy so NSFW**
https://www.mediafire.com/view/jqc6wwck574qmtz/__shiroko__blue_archive__shiroko_terror__blue_archive__blue_archive_drawn_by_sgholln__018d13fb44760ad86f042c337227dda9.png/file
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| crash on specific images and distance 3 | https://api.github.com/repos/libjxl/libjxl/issues/3927/comments | 10 | 2024-11-13T01:15:42Z | 2025-04-27T02:42:45Z | https://github.com/libjxl/libjxl/issues/3927 | 2,653,811,863 | 3,927 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
#3090 (based on #1362) greatly improved perceptual quality of dark images, however at high zoom levels, zooming with NN upsampling or in images with smooth gradients, the crosshatching becomes obvious and even distracting on some images.
**Describe the solution you'd like**
Adding a decode flag, or outright replacing the 8x8 ordered dithering with one of the fast solutions already in use for blue noise dithering https://psychopath.io/post/2022_07_24_owen_scrambling_based_dithered_blue_noise_sampling
| Use Blue Noise for dithering | https://api.github.com/repos/libjxl/libjxl/issues/3926/comments | 3 | 2024-11-12T15:50:02Z | 2025-01-06T01:58:55Z | https://github.com/libjxl/libjxl/issues/3926 | 2,652,596,080 | 3,926 |
[
"libjxl",
"libjxl"
] | please add a static binary for MacOS in your binaries releases | Please release jxl-x64-darwin-static.zip | https://api.github.com/repos/libjxl/libjxl/issues/3924/comments | 3 | 2024-11-07T16:18:37Z | 2025-01-09T09:40:57Z | https://github.com/libjxl/libjxl/issues/3924 | 2,641,519,384 | 3,924 |
[
"libjxl",
"libjxl"
] | I'm trying to build `libjxl` on macOS on `tag: v0.11.0`:
```
which clang
/usr/local/opt/llvm/bin/clang
clang --version
Homebrew clang version 19.1.3
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF ..
-- The C compiler identification is AppleClang 16.0.0.16000026
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
...
```
I think `cmake` does not look at my shell $PATH when I see the version names.
```
echo $CMAKE_PREFIX_PATH
/usr/local/opt/giflib /usr/local/opt/jpeg-turbo /usr/local/opt/libpng /usr/local/opt/zlib
cmake --build . -- -j8
...
/Users/fractale/libjxl/lib/extras/enc/apng.cc:214:3: error: no matching function for call to 'png_set_keep_unknown_chunks' 12:35:48 [134/3750]
214 | png_set_keep_unknown_chunks(png_ptr, PNG_HANDLE_CHUNK_ALWAYS,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Frameworks/Mono.framework/Headers/png.h:2498:18: note: candidate function not viable: 3rd argument ('const png_byte *' (aka 'const unsigned char *')) would lose const qu
alifier
2498 | PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp
| ^
2499 | png_ptr, int keep, png_bytep chunk_list, int num_chunks));
| ~~~~~~~~~~~~~~~~~~~~
/Library/Frameworks/Mono.framework/Headers/pngconf.h:1361:58: note: expanded from macro 'PNG_EXPORT'
1361 | # define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
| ^
/Users/fractale/libjxl/lib/extras/enc/apng.cc:250:45: error: use of undeclared identifier 'PNG_FP_1'
250 | png_set_gAMA_fixed(png_ptr, info_ptr, PNG_FP_1);
| ^
/Users/fractale/libjxl/lib/extras/enc/apng.cc:278:3: error: no matching function for call to 'png_set_keep_unknown_chunks'
278 | png_set_keep_unknown_chunks(png_ptr, PNG_HANDLE_CHUNK_ALWAYS,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Frameworks/Mono.framework/Headers/png.h:2498:18: note: candidate function not viable: 3rd argument ('const png_byte *' (aka 'const unsigned char *')) would lose const qu
alifier
2498 | PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp
| ^
2499 | png_ptr, int keep, png_bytep chunk_list, int num_chunks));
| ~~~~~~~~~~~~~~~~~~~~
```
do you know what is doing on? | need help building for MacOS | https://api.github.com/repos/libjxl/libjxl/issues/3923/comments | 1 | 2024-11-07T11:45:53Z | 2025-04-27T02:38:20Z | https://github.com/libjxl/libjxl/issues/3923 | 2,640,783,791 | 3,923 |
[
"libjxl",
"libjxl"
] | for reference: https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary
Homebrew seems to provide binaries that use shared libraries according to the dependencies:
```
"dependencies": [
"brotli",
"giflib",
"highway",
"imath",
"jpeg-turbo",
"libpng",
"little-cms2",
"openexr",
"webp"
]
``` | How to build libjxl as a static Universal macOS Binary? | https://api.github.com/repos/libjxl/libjxl/issues/3922/comments | 0 | 2024-11-07T09:46:03Z | 2025-04-27T02:37:14Z | https://github.com/libjxl/libjxl/issues/3922 | 2,640,456,836 | 3,922 |
[
"libjxl",
"libjxl"
] | E.g.
`ffmpeg -v quiet -i "Bi-Disorder.webp" -c:v png -pix_fmt rgb24 -compression_level 0 -f image2 - | cjxl --allow_expert_options -e 11 -d 0 - "Bi-Disorder.jxl"`
\# ^ 25,509 B
`ffmpeg -v quiet -i "Bi-Disorder.webp" -c:v png -compression_level 0 -f image2 - | cjxl --allow_expert_options -e 11 -d 0 - "Bi-Disorder.rgba.jxl"`
\# ^ 25,503 B
JXL v0.11.0 4df1e9e (20240913)
Input: https://github.com/MasterInQuestion/attach/raw/main/microsoft/vscode/11770/Bi-Disorder.webp
(20,424 B; WebP Lossless: 1534x270)
| RGB larger than RGBA? (same image) | https://api.github.com/repos/libjxl/libjxl/issues/3921/comments | 14 | 2024-11-06T19:54:56Z | 2025-01-26T12:55:37Z | https://github.com/libjxl/libjxl/issues/3921 | 2,639,083,059 | 3,921 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Effort 1-4 produce such bigger file than original (PNG)
**To Reproduce**
Lossless png compression with 1-4 effort.
**Environment**
- OS: Win
- Compiler version: original
- CPU type: i7-8700
- cjxl/djxl version string: JPEG XL encoder v0.11.0 4df1e9e [AVX2,SSE2]
Files: https://pixeldrain.com/u/1t1gG2qF | Low effort produce bigger than input file | https://api.github.com/repos/libjxl/libjxl/issues/3916/comments | 3 | 2024-10-30T04:01:56Z | 2025-02-03T20:15:30Z | https://github.com/libjxl/libjxl/issues/3916 | 2,622,824,219 | 3,916 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Comparing a PNG file and a corresponding JXL encode are producing strange and incorrect results with ssimulacra2 and butteraugli_main, and the results are inconsistent with what one would get by decoding to PNG first.
**To Reproduce**
Take [this JXL file](https://github.com/user-attachments/assets/61f8b0f9-63b3-4e5b-ad95-a79b51dcbff4), which was encoded from [this PNG file](https://github.com/user-attachments/assets/e98b8f57-7b3c-45ef-bfe6-36513f41c89b). The encode looks weird in the bottom strip (this is a bug in hydrium I need to fix) but the JXL file itself is not corrupt. Then, compare it to the original using `ssimulacra2`.
```
$ ssimulacra2 ants.png ants-ho.jxl
100.00000000
```
Similar strange inconsistencies happen with `butteraugli_main` and the decoded PNG:
```
leo@gauss ~ :) $ djxl -v -v -v ants-ho.jxl ants-ho.png
JPEG XL decoder v0.12.0 c6355600 [AVX2]
Read 1532160 compressed bytes.
Decoded to pixels.
Encoding decoded image
Wrote output to ants-ho.png
3600 x 2500, 283.655 MP/s [283.66, 283.66], , 1 reps, 8 threads.
leo@gauss ~ :) $ ssimulacra2 ants.png ants-ho.jxl
100.00000000
leo@gauss ~ :) $ ssimulacra2 ants.png ants-ho.png
-3.34886639
leo@gauss ~ :) $ butteraugli_main ants.png ants-ho.jxl
232944.4687500000
3-norm: 36450.691928
leo@gauss ~ :) $ butteraugli_main ants.png ants-ho.png
116.2695770264
3-norm: 19.626621
leo@gauss ~ :) $
```
Considering that `ants-ho.png` is decoded directly from `ants-ho.jxl`, it should produce the same ssimulacra2 and butteraugli scores (with possible minor errors due to int/float or linearizing conversions), but it does not. These aren't close. I suspect the comparison of the PNGs is the correct score and the comparison to the JXL is not.
**Expected behavior**
The scores should match (or almost match).
**Environment**
- OS: Arch Linux 86_64
- Compiler version: gcc version 14.2.1 20240910 (GCC)
- cjxl/djxl version string: JPEG XL decoder v0.12.0 c6355600 [AVX2]
- ssimulacra2 and butteraugli_main don't have version strings but they're linked to the same libjxl and built from the same repository. ldd logs below.
**Full Log**
```
leo@gauss ~ :) $ umbrielpng ants.png
PNG signature found: ants.png
Chunk: IHDR, Size: 25, Offset: 8, CRC32: ded058da
Chunk: sRGB, Size: 13, Offset: 33, CRC32: d9c92c7f
Chunk: IDAT, Size: 9736558, Offset: 46, CRC32: f12a8c7a
Chunk: IEND, Size: 12, Offset: 9736604, CRC32: ae426082
Size: 3600x2500, Color: 8-bit RGB
leo@gauss ~ :) $ hydrium --one-frame ants.png ants-ho.jxl
libhydrium version 0.4.2
Max libhydrium heap memory: 71967172 bytes
leo@gauss ~ :) $ jxlinfo -v ants-ho.jxl
JPEG XL image, 3600x2500, lossy, 8-bit RGB
num_color_channels: 3
num_extra_channels: 0
have_preview: 0
have_animation: 0
Intrinsic dimensions: 3600x2500
Orientation: 1 (Normal)
Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Relative
leo@gauss ~ :) $ jxlatte --info=v ants-ho.jxl
Image: ants-ho.jxl
Level: 5
Size: 3600x2500
Pixel Format: RGB
Bit Depth: 8
Extra Channels: 0
XYB Encoded: true
Primaries: sRGB / BT.709
White Point: D65
Transfer Function: sRGB / ISO-IEC 61966-2-1
Lossless: No
Frame Info:
Encoding: VarDCT
Type: Regular
Size: 3600x2500
Origin: (0, 0)
YCbCr: false
Decoded to pixels, discarding output.
leo@gauss ~ :) $ djxl -v -v -v ants-ho.jxl ants-ho.png
JPEG XL decoder v0.12.0 c6355600 [AVX2]
Read 1532160 compressed bytes.
Decoded to pixels.
Encoding decoded image
Wrote output to ants-ho.png
3600 x 2500, 283.655 MP/s [283.66, 283.66], , 1 reps, 8 threads.
leo@gauss ~ :) $ ssimulacra2 ants.png ants-ho.jxl
100.00000000
leo@gauss ~ :) $ ssimulacra2 ants.png ants-ho.png
-3.34886639
leo@gauss ~ :) $ butteraugli_main ants.png ants-ho.jxl
232944.4687500000
3-norm: 36450.691928
leo@gauss ~ :) $ butteraugli_main ants.png ants-ho.png
116.2695770264
3-norm: 19.626621
leo@gauss ~ :) $ ldd "$(which ssimulacra2)"
linux-vdso.so.1 (0x00007228b96c3000)
libjxl.so.0.12 => /home/leo/.local/lib/libjxl.so.0.12 (0x00007228b9200000)
libgif.so.7 => /usr/lib/libgif.so.7 (0x00007228b95cc000)
libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007228b9162000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007228b9591000)
libOpenEXR-3_2.so.31 => /usr/lib/libOpenEXR-3_2.so.31 (0x00007228b8e00000)
libjxl_cms.so.0.12 => /home/leo/.local/lib/libjxl_cms.so.0.12 (0x00007228b9148000)
libtcmalloc_minimal.so.4 => /usr/lib/libtcmalloc_minimal.so.4 (0x00007228b8c2a000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007228b8800000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007228b8b3b000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007228b8b0d000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007228b860f000)
libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007228b9139000)
libbrotlienc.so.1 => /usr/lib/libbrotlienc.so.1 (0x00007228b855d000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007228b96c5000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007228b9120000)
libIlmThread-3_2.so.31 => /usr/lib/libIlmThread-3_2.so.31 (0x00007228b8b02000)
libOpenEXRCore-3_2.so.31 => /usr/lib/libOpenEXRCore-3_2.so.31 (0x00007228b8200000)
libIex-3_2.so.31 => /usr/lib/libIex-3_2.so.31 (0x00007228b84dd000)
libImath-3_1.so.29 => /usr/lib/libImath-3_1.so.29 (0x00007228b8aaf000)
liblcms2.so.2 => /usr/lib/liblcms2.so.2 (0x00007228b8475000)
libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007228b8a8c000)
libdeflate.so.0 => /usr/lib/libdeflate.so.0 (0x00007228b845f000)
leo@gauss ~ :) $ ldd "$(which butteraugli_main)"
linux-vdso.so.1 (0x00007757522fd000)
libjxl_threads.so.0.12 => /home/leo/.local/lib/libjxl_threads.so.0.12 (0x00007757522f1000)
libgif.so.7 => /usr/lib/libgif.so.7 (0x00007757522a1000)
libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x0000775752203000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007757521c8000)
libOpenEXR-3_2.so.31 => /usr/lib/libOpenEXR-3_2.so.31 (0x0000775751a00000)
libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007757521b9000)
libbrotlienc.so.1 => /usr/lib/libbrotlienc.so.1 (0x0000775751d4c000)
libjxl_cms.so.0.12 => /home/leo/.local/lib/libjxl_cms.so.0.12 (0x0000775751d32000)
libtcmalloc_minimal.so.4 => /usr/lib/libtcmalloc_minimal.so.4 (0x000077575182a000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0000775751400000)
libm.so.6 => /usr/lib/libm.so.6 (0x000077575173b000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x000077575170d000)
libc.so.6 => /usr/lib/libc.so.6 (0x000077575120f000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007757522ff000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007757516f4000)
libIlmThread-3_2.so.31 => /usr/lib/libIlmThread-3_2.so.31 (0x0000775751d25000)
libOpenEXRCore-3_2.so.31 => /usr/lib/libOpenEXRCore-3_2.so.31 (0x0000775750e00000)
libIex-3_2.so.31 => /usr/lib/libIex-3_2.so.31 (0x000077575118f000)
libImath-3_1.so.29 => /usr/lib/libImath-3_1.so.29 (0x00007757516a3000)
libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x000077575116c000)
liblcms2.so.2 => /usr/lib/liblcms2.so.2 (0x0000775751104000)
libdeflate.so.0 => /usr/lib/libdeflate.so.0 (0x000077575168d000)
leo@gauss ~ :) $ ldd "$(which djxl)"
linux-vdso.so.1 (0x00007a50b9908000)
libjxl_threads.so.0.12 => /home/leo/.local/lib/libjxl_threads.so.0.12 (0x00007a50b98aa000)
libjxl.so.0.12 => /home/leo/.local/lib/libjxl.so.0.12 (0x00007a50b9400000)
libjxl_cms.so.0.12 => /home/leo/.local/lib/libjxl_cms.so.0.12 (0x00007a50b9890000)
libgif.so.7 => /usr/lib/libgif.so.7 (0x00007a50b9840000)
libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007a50b97a2000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007a50b93c5000)
libOpenEXR-3_2.so.31 => /usr/lib/libOpenEXR-3_2.so.31 (0x00007a50b9000000)
libhwy.so.1 => /usr/lib/libhwy.so.1 (0x00007a50b9794000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007a50b8c00000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007a50b8f11000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007a50b9397000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007a50b8a0f000)
libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007a50b9388000)
libbrotlienc.so.1 => /usr/lib/libbrotlienc.so.1 (0x00007a50b895d000)
liblcms2.so.2 => /usr/lib/liblcms2.so.2 (0x00007a50b9320000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007a50b990a000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007a50b8ef8000)
libIlmThread-3_2.so.31 => /usr/lib/libIlmThread-3_2.so.31 (0x00007a50b8eed000)
libOpenEXRCore-3_2.so.31 => /usr/lib/libOpenEXRCore-3_2.so.31 (0x00007a50b8600000)
libIex-3_2.so.31 => /usr/lib/libIex-3_2.so.31 (0x00007a50b88dd000)
libImath-3_1.so.29 => /usr/lib/libImath-3_1.so.29 (0x00007a50b8e9c000)
libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007a50b88ba000)
libdeflate.so.0 => /usr/lib/libdeflate.so.0 (0x00007a50b8e86000)
leo@gauss ~ :) $ umbrielpng -v -v ants-ho.png
PNG signature found: ants-ho.png
Chunk: IHDR, Size: 25, Offset: 8, CRC32: ded058da
Chunk: gAMA, Size: 16, Offset: 33, CRC32: 0bfc6105
Chunk: sRGB, Size: 13, Offset: 49, CRC32: d9c92c7f
Chunk: cHRM, Size: 44, Offset: 62, CRC32: 9cba513c
Chunk: IDAT, Size: 8204, Offset: 106, CRC32: ca29f511
Chunk: 1434 more IDAT chunks
Chunk: IEND, Size: 12, Offset: 11764887, CRC32: ae426082
Size: 3600x2500, Color: 8-bit RGB
gAMA: 45455
sRGB: Intent: Relative
cHRM matches sRGB space
```
**Additional Notes**
The photograph here is one I took. It's CC0, and the original file is [on Wikipedia.](https://commons.wikimedia.org/wiki/File:Ants_on_a_dandelion.jpg).
| ssimulacra2 and butteraugli_main produce wildly incorrect results for JXL input | https://api.github.com/repos/libjxl/libjxl/issues/3909/comments | 1 | 2024-10-26T14:11:33Z | 2024-10-26T14:23:57Z | https://github.com/libjxl/libjxl/issues/3909 | 2,615,892,439 | 3,909 |
[
"libjxl",
"libjxl"
] | I don't know how feasible this is, but it would be great to be able to convert .RAW and similar camera formats (like Sony's .ARW) to JPEG XL.
| .RAW support (raw image format) | https://api.github.com/repos/libjxl/libjxl/issues/3908/comments | 6 | 2024-10-23T19:43:17Z | 2024-10-24T11:24:12Z | https://github.com/libjxl/libjxl/issues/3908 | 2,609,685,147 | 3,908 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
On compiling LibJXL with `makepkg` I'm getting an error when trying to compile Java components with "No such file or directory"
`-DJPEGXL_INSTALL_JARDIR='/usr/share/java'` is where it looks for the Java directory, but instead it's getting directory wrong. This directory exists on the system, but instead during it's failure it's pointing to:
`$HOME/libjxl/pkg/libjxl/usr/share/java/` for all JAR files, except there is no `java` directory here created when using `makepkg -si` to compile and install.
**To Reproduce**
- clone git
- run `makepkg -si` for PKGBUILD
- Wait excessively long time for all 8136 tests to finish
**Expected behavior**
I don't know what it's suppose to expect here when `-DCMAKE_INSTALL_PREFIX:PATH='/usr'` is set in PKGBUILD
**Screenshots**

All tests successfully pass, until it gets to copying files from one location to another to a non-existence directory that isn't created or added by `makepkg`.

PKGBUILD environment
Execution of failure occurs at this line of the PKGBUILD:
`mv "${pkgdir}/usr/share/java"/{org.jpeg.jpegxl,jpegxl}.jar`
should `${pkgdir}` be removed from this line? seems like it should, because it'll point to all the existing Java files right there on the system that's already installed.
**Environment**
- OS: Manjaro Linux 24.1.1
- Compiler version: cmake 3.30.3
- CPU type: i7-7700k
- cjxl/djxl version string: libjpeg-turbo version 3.0.3 (build 20240518)
**Additional context**
This package is a required dependency of `ffmpeg-obs>=7.0.2-4`
Can I just skip Java altogether? Is it really required to have Java support? because ffmpeg-obs doesn't need to use Java.
Cannot update OBS Studio without this package, and the maintainer repository is outdated and/or partially updated and doesn't give me the required version `libjxl>=0.11.0` when the only the outdated version exists is for `libjxl-0.10.3-1`.
Additionally can we just skip the whole libjxl tests, if it's already passed with 100% success, I shouldn't need to wait for it to run the tests all over all because one error terminates the build to install when it begins to copy files from A to B, only to fail on copy because _"No such file or directory"_ is presented. | "org.jpeg.jpegxl.jar' No such file or directory | https://api.github.com/repos/libjxl/libjxl/issues/3907/comments | 2 | 2024-10-23T13:51:21Z | 2024-11-28T18:03:47Z | https://github.com/libjxl/libjxl/issues/3907 | 2,608,702,955 | 3,907 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
A bad behavior is found when applying cjxl to do the lossy compression of multispectral images in jxl format.
This may be caused by the default distance for extra channels (e.g., 0 for lossless compression).
**Describe the solution you'd like**
Add some option to cjxl to set distances for all extra channels.
**Describe alternatives you've considered**
Set the default distance for extra channels the same as the main channels (first three or RGB).
**Additional context**
None
| Add some option to cjxl to set distances for all extra channels | https://api.github.com/repos/libjxl/libjxl/issues/3906/comments | 1 | 2024-10-23T08:14:17Z | 2024-11-23T11:46:34Z | https://github.com/libjxl/libjxl/issues/3906 | 2,607,691,300 | 3,906 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
The encode_effort.md file has not been updated to take into account the changes to the effort scale in 0.10 (?).
**Describe the solution you'd like**
N/A
**Describe alternatives you've considered**
N/A
**Additional context**
Effort 11 requires the allow_expert_options, maybe mention it's not a good idea to use in production (3min+ for 64x64 icons).
| docs/encode_effort.md needs updating | https://api.github.com/repos/libjxl/libjxl/issues/3904/comments | 1 | 2024-10-17T09:31:07Z | 2024-12-10T18:45:07Z | https://github.com/libjxl/libjxl/issues/3904 | 2,594,157,774 | 3,904 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Since upgrading to OpenEXR 3.3.0, I see the following test failure with libjxl. It happens with libjxl 0.10.3 and HEAD and OpenEXR 3.3.0 through HEAD.
```
2779/8286 Test #2788: CodecTest.TestRoundTrip ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................***Failed 0.09 sec
Running main() from /build/source/googletest/src/gtest_main.cc
Note: Google Test filter = CodecTest.TestRoundTrip
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from CodecTest
[ RUN ] CodecTest.TestRoundTrip
Codec .png bps:4 gr:0 al:0 be: 0 ec: 0
Codec .png bps:4 gr:0 al:0 be: 1 ec: 0
Codec .png bps:4 gr:0 al:1 be: 0 ec: 0
Codec .png bps:4 gr:0 al:1 be: 1 ec: 0
Codec .png bps:4 gr:1 al:0 be: 0 ec: 0
Codec .png bps:4 gr:1 al:0 be: 1 ec: 0
Codec .png bps:4 gr:1 al:1 be: 0 ec: 0
Codec .png bps:4 gr:1 al:1 be: 1 ec: 0
Codec .png bps:8 gr:0 al:0 be: 0 ec: 0
Codec .png bps:8 gr:0 al:0 be: 1 ec: 0
Codec .png bps:8 gr:0 al:1 be: 0 ec: 0
Codec .png bps:8 gr:0 al:1 be: 1 ec: 0
Codec .png bps:8 gr:1 al:0 be: 0 ec: 0
Codec .png bps:8 gr:1 al:0 be: 1 ec: 0
Codec .png bps:8 gr:1 al:1 be: 0 ec: 0
Codec .png bps:8 gr:1 al:1 be: 1 ec: 0
Codec .png bps:10 gr:0 al:0 be: 0 ec: 0
Codec .png bps:10 gr:0 al:0 be: 1 ec: 0
Codec .png bps:10 gr:0 al:1 be: 0 ec: 0
Codec .png bps:10 gr:0 al:1 be: 1 ec: 0
Codec .png bps:10 gr:1 al:0 be: 0 ec: 0
Codec .png bps:10 gr:1 al:0 be: 1 ec: 0
Codec .png bps:10 gr:1 al:1 be: 0 ec: 0
Codec .png bps:10 gr:1 al:1 be: 1 ec: 0
Codec .png bps:12 gr:0 al:0 be: 0 ec: 0
Codec .png bps:12 gr:0 al:0 be: 1 ec: 0
Codec .png bps:12 gr:0 al:1 be: 0 ec: 0
Codec .png bps:12 gr:0 al:1 be: 1 ec: 0
Codec .png bps:12 gr:1 al:0 be: 0 ec: 0
Codec .png bps:12 gr:1 al:0 be: 1 ec: 0
Codec .png bps:12 gr:1 al:1 be: 0 ec: 0
Codec .png bps:12 gr:1 al:1 be: 1 ec: 0
Codec .png bps:16 gr:0 al:0 be: 0 ec: 0
Codec .png bps:16 gr:0 al:0 be: 1 ec: 0
Codec .png bps:16 gr:0 al:1 be: 0 ec: 0
Codec .png bps:16 gr:0 al:1 be: 1 ec: 0
Codec .png bps:16 gr:1 al:0 be: 0 ec: 0
Codec .png bps:16 gr:1 al:0 be: 1 ec: 0
Codec .png bps:16 gr:1 al:1 be: 0 ec: 0
Codec .png bps:16 gr:1 al:1 be: 1 ec: 0
Codec .ppm bps:4 gr:0 al:0 be: 1 ec: 0
Codec .pam bps:4 gr:0 al:1 be: 1 ec: 0
Codec .pam bps:4 gr:0 al:1 be: 1 ec: 1
Codec .pgm bps:4 gr:1 al:0 be: 1 ec: 0
Codec .pam bps:4 gr:1 al:1 be: 1 ec: 0
Codec .pam bps:4 gr:1 al:1 be: 1 ec: 1
Codec .ppm bps:8 gr:0 al:0 be: 1 ec: 0
Codec .pam bps:8 gr:0 al:1 be: 1 ec: 0
Codec .pam bps:8 gr:0 al:1 be: 1 ec: 1
Codec .pgm bps:8 gr:1 al:0 be: 1 ec: 0
Codec .pam bps:8 gr:1 al:1 be: 1 ec: 0
Codec .pam bps:8 gr:1 al:1 be: 1 ec: 1
Codec .ppm bps:10 gr:0 al:0 be: 1 ec: 0
Codec .pam bps:10 gr:0 al:1 be: 1 ec: 0
Codec .pam bps:10 gr:0 al:1 be: 1 ec: 1
Codec .pgm bps:10 gr:1 al:0 be: 1 ec: 0
Codec .pam bps:10 gr:1 al:1 be: 1 ec: 0
Codec .pam bps:10 gr:1 al:1 be: 1 ec: 1
Codec .ppm bps:12 gr:0 al:0 be: 1 ec: 0
Codec .pam bps:12 gr:0 al:1 be: 1 ec: 0
Codec .pam bps:12 gr:0 al:1 be: 1 ec: 1
Codec .pgm bps:12 gr:1 al:0 be: 1 ec: 0
Codec .pam bps:12 gr:1 al:1 be: 1 ec: 0
Codec .pam bps:12 gr:1 al:1 be: 1 ec: 1
Codec .ppm bps:16 gr:0 al:0 be: 1 ec: 0
Codec .pam bps:16 gr:0 al:1 be: 1 ec: 0
Codec .pam bps:16 gr:0 al:1 be: 1 ec: 1
Codec .pgm bps:16 gr:1 al:0 be: 1 ec: 0
Codec .pam bps:16 gr:1 al:1 be: 1 ec: 0
Codec .pam bps:16 gr:1 al:1 be: 1 ec: 1
Codec .pfm bps:32 gr:0 al:0 be: 0 ec: 0
Codec .pfm bps:32 gr:1 al:0 be: 0 ec: 0
Codec .pgx bps:8 gr:1 al:0 be: 0 ec: 0
Codec .pgx bps:8 gr:1 al:0 be: 1 ec: 0
Codec .pgx bps:16 gr:1 al:0 be: 0 ec: 0
Codec .pgx bps:16 gr:1 al:0 be: 1 ec: 0
Codec .exr bps:32 gr:0 al:0 be: 0 ec: 0
./lib/extras/codec_test.cc:280: Failure
Value of: DecodeBytes(Bytes(encoded.bitstreams[0]), color_hints, &ppf_out)
Actual: false
Expected: true
Codec .exr bps:32 gr:0 al:0 be: 1 ec: 0
./lib/extras/codec_test.cc:280: Failure
Value of: DecodeBytes(Bytes(encoded.bitstreams[0]), color_hints, &ppf_out)
Actual: false
Expected: true
Codec .exr bps:32 gr:0 al:1 be: 0 ec: 0
./lib/extras/codec_test.cc:280: Failure
Value of: DecodeBytes(Bytes(encoded.bitstreams[0]), color_hints, &ppf_out)
Actual: false
Expected: true
Codec .exr bps:32 gr:0 al:1 be: 1 ec: 0
./lib/extras/codec_test.cc:280: Failure
Value of: DecodeBytes(Bytes(encoded.bitstreams[0]), color_hints, &ppf_out)
Actual: false
Expected: true
Codec .jpg bps:8 gr:0 al:0 be: 0 ec: 0
Codec .jpg bps:8 gr:0 al:0 be: 1 ec: 0
Codec .jpg bps:8 gr:1 al:0 be: 0 ec: 0
Codec .jpg bps:8 gr:1 al:0 be: 1 ec: 0
[ FAILED ] CodecTest.TestRoundTrip (6 ms)
[----------] 1 test from CodecTest (6 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (6 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] CodecTest.TestRoundTrip
1 FAILED TEST
```
**Environment**
- OS: NixOS
- Compiler version: GCC 13.3.0
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.10.3 [AVX2,SSE4,SSE2] | Test failure with OpenEXR 3.3.0+ | https://api.github.com/repos/libjxl/libjxl/issues/3901/comments | 2 | 2024-10-17T06:40:23Z | 2024-12-11T14:38:56Z | https://github.com/libjxl/libjxl/issues/3901 | 2,593,766,486 | 3,901 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Encoding an image with and without the `--disable_perceptual_optimization` option produces wildly different file sizes. With the option, compressed file is 3.5x the size without the option.
**To Reproduce**
Steps to reproduce the behavior:
1. Encode an image with perceptual optimization disabled.
`\bin\jxl\cjxl.exe kodim05.png rgb_percep0.jxl -q 90 -e 3 --disable_perceptual_optimizations`
2. Encode the same image without the option:
`\bin\jxl\cjxl.exe kodim05.png rgb.jxl -q 90 -e 3`
3. Observe the compressed file sizes (in bytes):
140,794 rgb.jxl
515,229 rgb_percep0.jxl
**Expected behavior**
File size shouldn't be so drastically different.
**Screenshots**
If applicable, add screenshots or example input/output images to help explain your problem.
**Environment**
- OS: [e.g. Windows]
- Compiler version: [e.g. clang 11.0.1]
- CPU type: [e.g. x86_64]
- cjxl/djxl version string: [e.g. cjxl [v0.3.7 | SIMD supported: SSE4,Scalar]]
**Additional notes**
Example input image but I tried several images and they all behave the same.

<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| `--disable_perceptual_optimization` produces unexpectedly large files | https://api.github.com/repos/libjxl/libjxl/issues/3896/comments | 17 | 2024-10-14T17:17:28Z | 2025-04-27T02:29:15Z | https://github.com/libjxl/libjxl/issues/3896 | 2,586,621,852 | 3,896 |
[
"libjxl",
"libjxl"
] | libjxl sometimes crashes with `enc_ans.cc:228: JXL_DASSERT: n <= 255` when encoding lossless monochrome samples at effort 8+.
See https://github.com/inflation/jpegxl-rs/issues/101.
**To Reproduce**
```sh
git clone https://github.com/libjxl/libjxl.git
cd libjxl
git checkout 095f259
./deps.sh
```
Replace the contents of `cjxl_main.cc` by
```cc
int main(int, char**) {
JxlEncoderPtr enc = JxlEncoderMake(nullptr);
JxlPixelFormat pixel_format = {1, JXL_TYPE_UINT16, JXL_NATIVE_ENDIAN, 0};
JxlBasicInfo basic_info;
JxlEncoderInitBasicInfo(&basic_info);
basic_info.xsize = 1;
basic_info.ysize = 1;
basic_info.bits_per_sample = 16;
basic_info.uses_original_profile = JXL_TRUE;
basic_info.num_color_channels = pixel_format.num_channels;
if (JXL_ENC_SUCCESS != JxlEncoderSetBasicInfo(enc.get(), &basic_info)) abort();
JxlColorEncoding color_encoding = {};
JXL_BOOL is_gray = TO_JXL_BOOL(pixel_format.num_channels < 3);
JxlColorEncodingSetToSRGB(&color_encoding, is_gray);
if (JXL_ENC_SUCCESS != JxlEncoderSetColorEncoding(enc.get(), &color_encoding)) abort();
JxlEncoderFrameSettings* f = JxlEncoderFrameSettingsCreate(enc.get(), nullptr);
if (JXL_ENC_SUCCESS != JxlEncoderFrameSettingsSetOption(f, JXL_ENC_FRAME_SETTING_EFFORT, 8)) abort();
if (JXL_ENC_SUCCESS != JxlEncoderSetFrameLossless(f, JXL_TRUE)) abort();
uint16_t pixels = 1020;
if (JXL_ENC_SUCCESS != JxlEncoderAddImageFrame(f, &pixel_format, &pixels, 16)) abort();
JxlEncoderCloseInput(enc.get());
std::vector<uint8_t> compressed(1024);
uint8_t* next_out = compressed.data();
size_t avail_out = compressed.size();
JxlEncoderProcessOutput(enc.get(), &next_out, &avail_out);
return EXIT_SUCCESS;
}
```
```sh
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build --parallel
build_dbg/tools/cjxl
```
**Expected behavior**
Silent success instead of:
```
./lib/jxl/enc_ans.cc:228: JXL_DASSERT: n <= 255
Illegal instruction
```
**Environment**
- OS: Linux
- Compiler version: GNU 13.2.0
- CPU type: `x86_64`
- cjxl/djxl version string: `v0.12.0 095f259b [AVX2,SSE4,SSE2]` | Lossless monochrome kitten+ encoding crashes in enc_ans.cc | https://api.github.com/repos/libjxl/libjxl/issues/3890/comments | 1 | 2024-10-14T10:45:08Z | 2024-10-17T18:27:21Z | https://github.com/libjxl/libjxl/issues/3890 | 2,585,626,945 | 3,890 |
[
"libjxl",
"libjxl"
] | Hello,
I just want to know why there are two official jpegli repositories atm.
https://github.com/google/jpegli
https://github.com/libjxl/libjxl/tree/main/lib/jpegli
Is there a reason for that? Because there are at different patch states.
| Two different jpegli repositories | https://api.github.com/repos/libjxl/libjxl/issues/3889/comments | 5 | 2024-10-13T20:49:49Z | 2024-10-17T06:42:58Z | https://github.com/libjxl/libjxl/issues/3889 | 2,584,261,380 | 3,889 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When losslessly transcoding JPEG images to JXL, the setting `--effort=9` consistently produces smaller images than `--effort=10` or even `--allow_expert_options --effort=11`. I would not report this if this was inconsistent, as I know compression algorithms are just like that sometimes. In fact, one image I tested is actually 339 bytes smaller at effort 8 vs 9, which I couldn't replicate on any other image. However, the fact that effort 9 is seemingly *always* better signals to me that something is wrong.
**To Reproduce**
1. Find a JPEG
2. Run it through `cjxl --effort=9`
3. Try it again with `cjxl --effort=10`
4. Compare file sizes
For ease of testing, I made a short script which tries effort levels with clean terminal output and no file output. You can save this and pass a JPEG (or multiple JPEGs) to it like `./generate.sh cool.jpg`
<details>
<summary>Testing script:</summary>
```bash
#!/bin/bash
for file in "$@"; do
echo $file
for i in {8..11}; do
echo -n "Effort $(printf "%02d" $i) "
command cjxl "$file" --disable_output --allow_expert_options --effort=$i 2>&1 >/dev/null | grep "Compressed"
done
done
```
</details>
**Expected behavior**
Higher effort should at least *usually* give equal or better output than previous levels.
**Environment**
- OS: Ultramarine (Fedora) 40
- Compiler version: Clang 18.1.3
- CPU type: x86_64
- cjxl/djxl version string: `cjxl v0.12.0 [AVX3,AVX2,SSE4,SSE2]` (compiled 095f259b07e81c0fda25f56686e49984d852b530)
**Additional context**
<details>
<summary>Example results (contains 175kb of images):</summary>
Using the following images:



The following output was obtained:
```
600px-Black_Holes_And_Revelations.jpg
Effort 08 Compressed to 78625 bytes including container
Effort 09 Compressed to 78578 bytes including container
Effort 10 Compressed to 78636 bytes including container
Effort 11 Compressed to 78636 bytes including container
mario.jpg
Effort 08 Compressed to 44538 bytes including container
Effort 09 Compressed to 44877 bytes including container
Effort 10 Compressed to 44979 bytes including container
Effort 11 Compressed to 44979 bytes including container
phon.jpg
Effort 08 Compressed to 28773 bytes including container
Effort 09 Compressed to 28746 bytes including container
Effort 10 Compressed to 28755 bytes including container
Effort 11 Compressed to 28755 bytes including container
```
</details> | Lossless JPEG transcoding is consistently larger with effort 10/11 | https://api.github.com/repos/libjxl/libjxl/issues/3888/comments | 3 | 2024-10-13T03:06:57Z | 2024-11-28T12:36:06Z | https://github.com/libjxl/libjxl/issues/3888 | 2,583,596,038 | 3,888 |
[
"libjxl",
"libjxl"
] | Hi,
I'm maintainer or wrappers for libjxl for [iOS](https://github.com/awxkee/jxl-coder-swift) and [android](https://github.com/awxkee/jxl-coder).
Last update to `0.11.0` almost twiced JXL binaries size, this makes unreasonable to update binaries, since no one will wish to add to their mobile app 5+mb for each platform. Especially, who distributes universal APK definitely will avoid to permamently add 20+ MB one click in their app just for JXL.
If you expect libjxl to be distributed on mobile platforms at least by 3rd parties, size should be returned at least to 3.74 mb ( this is brotli + highway + jxl + cms + threads, since mobile platform do not have pre-installed options) for aarch64 android.
Also will be very kind of you to provide option to generate binaries as small as possible preserving all mandatory features. | Reduce excessive codegen | https://api.github.com/repos/libjxl/libjxl/issues/3887/comments | 3 | 2024-10-11T15:28:33Z | 2024-11-28T10:15:57Z | https://github.com/libjxl/libjxl/issues/3887 | 2,581,649,030 | 3,887 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
(base) PS C:\temp> cjxl.exe -q 100 .\FELT-002_Fairy_Queen_.jpg 1.jxl
JPEG XL encoder v0.11.0 4df1e9e [AVX2,SSE2]
Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0).
Encoding [JPEG, lossless transcode, effort: 7]
Error while decoding the JPEG image. It may be corrupt (e.g. truncated) or of an unsupported type (e.g. CMYK).
EncodeImageJXL() failed.
**To Reproduce**
Steps to reproduce the behavior:

**Expected behavior**
A clear and concise description of what you expected to happen.
**Environment**
- OS: windows
- Compiler version: offical releases version
- CPU type: 3700x
- cjxl/djxl version string: cjxl v0.11.0 4df1e9e [AVX2,SSE2]
**Additional context**
Add any other context about the problem here.
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| When I convert a CMYK jpeg to jxl, cjxl raises error | https://api.github.com/repos/libjxl/libjxl/issues/3884/comments | 2 | 2024-10-11T09:41:18Z | 2024-11-04T22:40:05Z | https://github.com/libjxl/libjxl/issues/3884 | 2,580,926,335 | 3,884 |
[
"libjxl",
"libjxl"
] | Can you make it so that we can input both regular webps and animated webps so we can convert them to jxl using cjxl? I think this feature could be very useful. | WEBP to JXL | https://api.github.com/repos/libjxl/libjxl/issues/3883/comments | 4 | 2024-10-09T21:22:31Z | 2024-10-14T10:14:03Z | https://github.com/libjxl/libjxl/issues/3883 | 2,576,980,316 | 3,883 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
A surprising number of JPEGs in the wild, like those found on Reddit, cannot be losslessly reconstructed. A quick analysis indicates this is true for ~1% of images.
**To Reproduce**
Input: [cjxl_losslessfail.zip](https://github.com/user-attachments/files/17302489/cjxl_losslessfail.zip)
```
$ cjxl --lossless_jpeg=1 input.jpeg output.jxl
JPEG XL encoder v0.11.0 0.11.0 [AVX2,SSE4,SSE2]
Encoding [JPEG, lossless transcode, effort: 7]
JPEG bitstream reconstruction data could not be created. Possibly there is too much tail data.
Try using --allow_jpeg_reconstruction 0, to losslessly recompress the JPEG image data without bitstream reconstruction data.
EncodeImageJXL() failed.
$ cjxl --lossless_jpeg=1 --allow_jpeg_reconstruction=0 input.jpeg output.jxl
JPEG XL encoder v0.11.0 0.11.0 [AVX2,SSE4,SSE2]
Encoding [JPEG, lossless transcode, effort: 7]
Compressed to 995.2 kB
```
**Expected behavior**
I expect cjxl with default parameters to always work with a JPEG image.
**Environment**
- OS: Linux/Ubuntu
- CPU type: x86_64
- cjxl/djxl version string: JPEG XL encoder v0.11.0 0.11.0 [AVX2,SSE4,SSE2]
**Additional context**
This photo is from the standard camera app on a One Plus 8, but there are many more examples available with different cameras and editing pipelines.
The affected category of JPEGs appear to be inefficiently compressed, using suboptimal huffman tables. jpegtran can losslessly recompress them ~10x, after which cjxl works. | ~1% of JPEGs in the wild fail JPEG reconstruction | https://api.github.com/repos/libjxl/libjxl/issues/3882/comments | 4 | 2024-10-09T05:25:26Z | 2024-10-14T09:07:33Z | https://github.com/libjxl/libjxl/issues/3882 | 2,574,793,586 | 3,882 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When using lossless float16 encoding, specific ranges of binary values appear to be corrupted. Specifically, it appears that all values with a binary representation corresponding to the uint16 ranges `[512:1023]`, `[31745:32767]`, `[33280:33793]`, and `[64513:65534]` are changed during an encode-decode cycle.
**To Reproduce**
Steps to reproduce the behavior:
1. Encode an image with any float16 value with a binary representation corresponding to the uint16 ranges `[512:1023]`, `[31745:32767]`, `[33280:33793]`, and `[64513:65534]`.
2. Decode the image.
3. Check that the image data has changed.
**Expected behavior**
Values should not change during a lossless encode-decode cycle. I've tested float32 encoding with all possible values and it works as expected.
**Screenshots**
Affected value ranges in yellow:

Bit values (yellow = True) for all 65536 float16 values with affected ranges between red and blue lines.

**Environment**
- OS: Ubuntu WSL2 on Windows (+ Windows, AMD64 and ARM64, see https://github.com/cgohlke/imagecodecs/issues/114)
- Compiler version: GCC 11 (I assume, it's a Python 3.10 extension)
- CPU type: AMD Ryzen 5900X
- libjxl version: 0.11.0 (according to [this](https://github.com/cgohlke/imagecodecs/blob/50bac419858de471b934943f949835aad18b5a96/imagecodecs/libjxl.pxd#L4))
- cjxl/djxl version string: Cannot test with cjxl/djxl as they don't appear to support any formats that allow float16.
**Additional context**
I found this issue using the `imagecodes` Python package. Original issue is https://github.com/cgohlke/imagecodecs/issues/114.
As mentioned in the issue linked above, I've not been able to test for the issue using cjxl/djxl or GIMP due to a lack of float16 support. | Encoding float16 lossless appears to produce artifacts for specific values | https://api.github.com/repos/libjxl/libjxl/issues/3881/comments | 3 | 2024-10-07T21:04:09Z | 2024-10-23T15:47:17Z | https://github.com/libjxl/libjxl/issues/3881 | 2,571,474,680 | 3,881 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
As far as I'm able to observe, output images from lossless JPEG transcode do not exactly match the input. High-frequency areas are covered in slight discrepancies.
**To Reproduce**
```
the0x539@scale $ ls
original.jpg
the0x539@scale $ cjxl original.jpg transcoded.jxl
JPEG XL encoder v0.11.0 4df1e9ec [AVX2,SSE4,SSE2]
Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0).
Encoding [JPEG, lossless transcode, effort: 7]
Compressed to 11509 bytes including container
the0x539@scale $ djxl transcoded.jxl decoded.png
JPEG XL decoder v0.11.0 4df1e9ec [AVX2,SSE4,SSE2]
Decoded to pixels.
800 x 600, 171.103 MP/s [171.10, 171.10], , 1 reps, 32 threads.
the0x539@scale $ imgcmp original.jpg decoded.png
original.jpg and decoded.png differ
```
**Expected behavior**
`original.jpg and decoded.png are identical`.
My testing methodology, including minor variations on it not shared here, behaves as expected for PNG inputs.
**Environment**
- OS: Windows 11 / WSL 2 / Arch
- Compiler version: ?
- CPU type: x86_64
- cjxl/djxl version string: `cjxl v0.11.0 4df1e9ec [AVX2,SSE4,SSE2]` (see above)
**Additional context**
- I authored `original.jpg` by drawing on a blank canvas in Paint.NET and saving as .jpg - nothing special.
- I first observed this at `-e 10`, but also observe it at levels 1, 5, and 7.
- [original.jpg, transcoded.jxl, and decoded.png](https://github.com/user-attachments/files/17267213/test.image.zip)
- [Source code for `imgcmp`](https://gist.github.com/The0x539/0cf290f30386c846a729285a21c41b4f) | Lossless JPEG transcode is not lossless? | https://api.github.com/repos/libjxl/libjxl/issues/3875/comments | 3 | 2024-10-05T19:28:02Z | 2024-10-05T21:40:10Z | https://github.com/libjxl/libjxl/issues/3875 | 2,568,284,082 | 3,875 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
A lossy JXL file with an ICC profile gets decoded to linear RGB, even for 8-bit PNG output.
**To Reproduce**
Steps to reproduce the behavior:
```
% cjxl -x icc_pathname=sRGB_v4_ICC_preference.icc image.ppm image.jxl
% djxl image.jxl image.png
```
**Expected behavior**
The output PNG file should have a color space matching the ICC profile. If this is not possible, linear RGB is a bad default for 8-bit outputs.
**Environment**
- OS: Alpine Linux
- Compiler version: gcc (Alpine 14.2.0) 14.2.0
- CPU type: x86_64
- cjxl/djxl version string: v0.12.0 57dd9253 [AVX2,SSE4,SSE2]
**Additional context**
libjxl does not recognize that the input color profile is sRGB, and thus tags the file with the linear RGB enum. On decode, the ICC profile is ignored in favor of the enum tag. The ICC profile is probably not recognized as sRGB due to it being extremely overcomplicated. | Lossy JXL with ICC profile decodes to linear RGB | https://api.github.com/repos/libjxl/libjxl/issues/3874/comments | 0 | 2024-10-04T16:30:52Z | 2024-10-14T09:08:18Z | https://github.com/libjxl/libjxl/issues/3874 | 2,566,746,409 | 3,874 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
A clear and concise description of what the bug is.
Images produced by the panorama mode on my Samsung phone are not losslessly transcodeable from JPEG to JPEG XL. It can be converted lossily with `--lossless_jpeg=0`.
**To Reproduce**
Steps to reproduce the behaviour:
1. Download and unzip this image:
[20240915_144212.zip](https://github.com/user-attachments/files/17184242/20240915_144212.zip)
2. `cjxl -d 0 --lossless_jpeg=1 20240915_144212.jpg out.jxl`
3. Observe failure to transcode.
**Expected behavior**
A clear and concise description of what you expected to happen.
The image is able to be losslessly transcoded.
**Screenshots**
If applicable, add screenshots or example input/output images to help explain your problem.
```sh
❯ cjxl -d 0 --lossless_jpeg=1 20240915_144212.jpg out.jxl
JPEG XL encoder v0.11.0 [NEON,NEON_WITHOUT_AES]
Encoding [JPEG, lossless transcode, effort: 7]
Error while decoding the JPEG image. It may be corrupt (e.g. truncated) or of an unsupported type (e.g. CMYK).
EncodeImageJXL() failed.
```
**Environment**
- OS: [e.g. Windows] Android (Termux)
- Compiler version: [e.g. clang 11.0.1] Whatever Termux uses.
- CPU type: [e.g. x86_64] aarch64
- cjxl/djxl version string: [e.g. cjxl [v0.3.7 | SIMD supported: SSE4,Scalar]] cjxl v0.11.0 [NEON,NEON_WITHOUT_AES]
**Additional context**
Add any other context about the problem here.
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| Panorama JPEG cannot be losslessly transcoded | https://api.github.com/repos/libjxl/libjxl/issues/3867/comments | 3 | 2024-09-30T05:02:44Z | 2024-10-09T14:05:39Z | https://github.com/libjxl/libjxl/issues/3867 | 2,555,564,694 | 3,867 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
In the code, two values, both float max, are added, causing an overflow.
If floating point exceptions are enabled, the application will be terminated.
In the `enc_ma.cc` code:
```
196 float lcost = std::numeric_limits<float>::max();
197 float rcost = std::numeric_limits<float>::max();
198 Predictor lpred = Predictor::Zero;
199 Predictor rpred = Predictor::Zero;
200 float Cost() const { return lcost + rcost; }
```
Calling `Cost()` can (and in practice will) add FLT_MAX to FLT_MAX.
```
Thread 1 "imageinout_test" received signal SIGFPE, Arithmetic exception.
0x00007ffff61c7291 in jxl::N_AVX2::FindBestSplit(jxl::TreeSamples&, float, std::vector<jxl::ModularMultiplierInfo, std::allocator<jxl::ModularMultiplierInfo> > const&, std::array<std::array<unsigned int, 2ul>, 2ul>, float, std::vector<jxl::PropertyDecisionNode, std::allocator<jxl::PropertyDecisionNode> >*)::SplitInfo::Cost() const
(this=0x7fffffff8870) at /home/stolk/src/libjxl/lib/jxl/modular/encoding/enc_ma.cc:200
``` | Floating Point overflow in FindBestSplit() | https://api.github.com/repos/libjxl/libjxl/issues/3865/comments | 0 | 2024-09-29T23:14:52Z | 2024-09-30T10:20:06Z | https://github.com/libjxl/libjxl/issues/3865 | 2,555,210,060 | 3,865 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Looks like build fails with cmake 3.30.3.
Quite possible that it could be cmake issue.
**To Reproduce**
Build with build cmake 3.30.3 installed.
**Expected behavior**
Build should not fail.
**Screenshots**
```console
[ 58%] Linking CXX executable tests/gain_map_test
cd /home/tkloczko/rpmbuild/BUILD/libjxl-0.11.0/x86_64-redhat-linux-gnu/lib && /usr/bin/cmake -E cmake_link_script CMakeFiles/gain_map_test.dir/link.txt --verbose=1
/usr/bin/g++ -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -fno-rtti -fno-exceptions -fno-rtti -O2 -g -DNDEBUG -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin -fPIE -pie CMakeFiles/gain_map_test.dir/extras/gain_map_test.cc.o -o tests/gain_map_test -Wl,-rpath,/home/tkloczko/rpmbuild/BUILD/libjxl-0.11.0/x86_64-redhat-linux-gnu/lib libjxl_testlib-internal.a libjxl_extras-internal.a /usr/lib64/libgtest_main.so.1.14.0 /usr/lib64/libgtest.so.1.14.0 libjxl-internal.a /usr/lib64/libhwy.so /usr/lib64/libbrotlidec.so /usr/lib64/libbrotlicommon.so /usr/lib64/libbrotlienc.so libjxl_cms.so.0.11.0 /usr/lib64/libtcmalloc_minimal.so libjxl_threads.so.0.11.0 /usr/lib64/libgif.so /usr/lib64/libjpeg.so /usr/lib64/libpng.so /usr/lib64/libOpenEXR-3_2.so /usr/lib64/libOpenEXRUtil-3_2.so /usr/lib64/libOpenEXRCore-3_2.so /usr/lib64/libIex-3_2.so /usr/lib64/libIlmThread-3_2.so /usr/lib64/libImath-3_1.so
cd /home/tkloczko/rpmbuild/BUILD/libjxl-0.11.0/x86_64-redhat-linux-gnu/lib && /usr/bin/cmake -D TEST_TARGET=gain_map_test -D TEST_EXECUTABLE=/home/tkloczko/rpmbuild/BUILD/libjxl-0.11.0/x86_64-redhat-linux-gnu/lib/tests/gain_map_test -D TEST_EXECUTOR= -D TEST_WORKING_DIR=/home/tkloczko/rpmbuild/BUILD/libjxl-0.11.0/x86_64-redhat-linux-gnu/lib -D TEST_EXTRA_ARGS= -D TEST_PROPERTIES= -D TEST_PREFIX= -D TEST_SUFFIX= -D TEST_FILTER= -D NO_PRETTY_TYPES=FALSE -D NO_PRETTY_VALUES=FALSE -D TEST_LIST=gain_map_test_TESTS -D CTEST_FILE=/home/tkloczko/rpmbuild/BUILD/libjxl-0.11.0/x86_64-redhat-linux-gnu/lib/gain_map_test[1]_tests.cmake -D TEST_DISCOVERY_TIMEOUT=240 -D TEST_XML_OUTPUT_DIR= -P /usr/share/cmake/Modules/GoogleTestAddTests.cmake
ReadTestData /home/tkloczko/rpmbuild/BUILD/libjxl-0.11.0/testdata/external/Compact-ICC-Profiles/profiles/scRGB-v2.icc
CMake Error at /usr/share/cmake/Modules/GoogleTestAddTests.cmake:112 (message):
Error running test executable.
Path: '/home/tkloczko/rpmbuild/BUILD/libjxl-0.11.0/x86_64-redhat-linux-gnu/lib/tests/gain_map_test'
Working directory: '/home/tkloczko/rpmbuild/BUILD/libjxl-0.11.0/x86_64-redhat-linux-gnu/lib'
Result: Illegal instruction
Output:
Call Stack (most recent call first):
/usr/share/cmake/Modules/GoogleTestAddTests.cmake:226 (gtest_discover_tests_impl)
make[2]: *** [lib/CMakeFiles/gain_map_test.dir/build.make:122: lib/tests/gain_map_test] Error 1
make[2]: *** Deleting file 'lib/tests/gain_map_test'
```
**Environment**
- OS: Linux x86/64
- Compiler version: gcc 14.2.1
- CPU type: x86_64
**Additional context**
N/A
| 0.11.0: build fails with cmake 3.30.3 | https://api.github.com/repos/libjxl/libjxl/issues/3864/comments | 15 | 2024-09-29T22:15:33Z | 2024-11-27T08:44:25Z | https://github.com/libjxl/libjxl/issues/3864 | 2,555,188,869 | 3,864 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When running cjxl on command line, informational messages get sent to stderr
**To Reproduce**
cjxl image.jpg image.jxl --lossless_jpeg=1 2>error.txt
**Expected behavior**
error.txt should be empty. Instead, it contains
```
JPEG XL encoder v0.11.0 0.11.0 [AVX2,SSE4,SSE2]
Encoding [JPEG, lossless transcode, effort: 7]
Compressed to 55382 bytes including container
```
- OS: macOS Sonoma 14.6.1
- cjxl/djxl version string: v0.11.0 0.11.0 [AVX2,SSE4,SSE2]
| Informational messages sent to stderr | https://api.github.com/repos/libjxl/libjxl/issues/3863/comments | 2 | 2024-09-28T12:38:29Z | 2024-10-01T17:24:13Z | https://github.com/libjxl/libjxl/issues/3863 | 2,554,199,456 | 3,863 |
[
"libjxl",
"libjxl"
] | Hi! I'm trying to integrate a JPEG XL WASM binary into an existing project that uses typescript and has a fairly strict style guide. To do this cleanly, I will need a standalone WASM build. Ideally, the project would provide a CMAKE flag that would generate standalone WASM modules.
I'm not that skilled at using cmake, but I managed to hack the ninja.build file it output to create what appears to be a working version. I'm still trying to get my entire pipeline working, but the WASM seems to load and execute exported functions, though I'm doing something wrong with them.
I ran the following cmake command.
```
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=/Users/ws9/code/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DBUILD_SHARED_LIBS=OFF -DJPEGXL_ENABLE_WASM_THREADS=OFF -DENABLE_JPEGLI_DEFAULT=NO
```
Then I edited the top level ninja.build file under the entry for building `jxl_decoder.js`. I changed the TARGET_FILE extension from `.js` to `.wasm` and added `-s STANDALONE_WASM=1 --no-entry` to the LINK_FLAGS.
This successfully generated a standalone WASM file with no accompanying JS file.
```
build tools/wasm_demo/jxl_decoder.js: CXX_EXECUTABLE_LINKER__jxl_decoder_Release tools/wasm_demo/CMakeFiles/jxl_decoder.dir/jxl_decoder.cc.o tools/wasm_demo/CMakeFiles/jxl_decoder.dir/jxl_decompressor.cc.o tools/wasm_demo/CMakeFiles/jxl_decoder.dir/no_png.cc.o | lib/libjxl_extras-internal.a lib/libjxl_threads.a third_party/sjpeg/libsjpeg.a lib/libjxl-internal.a third_party/brotli/libbrotlidec.a third_party/brotli/libbrotlicommon.a third_party/brotli/libbrotlienc.a lib/libjxl_cms.a lib/libjpegli-static.a third_party/highway/libhwy.a || lib/jxl_export lib/libjpegli-static.a lib/libjxl-internal.a lib/libjxl_cms.a lib/libjxl_extras-internal.a lib/libjxl_threads.a third_party/brotli/libbrotlicommon.a third_party/brotli/libbrotlidec.a third_party/brotli/libbrotlienc.a third_party/highway/libhwy.a third_party/sjpeg/libsjpeg.a
FLAGS = -fno-rtti -O3 -DNDEBUG
LINK_FLAGS = -s ALLOW_MEMORY_GROWTH=1 -s DISABLE_EXCEPTION_CATCHING=1 -s MODULARIZE=1 -s EXPORT_NAME="JxlDecoderModule" -s "EXPORTED_FUNCTIONS=[_free, _malloc, _jxlCreateInstance, _jxlDestroyInstance, _jxlFlush, _jxlProcessInput, _jxlDecompress, _jxlCleanup]" -s STANDALONE_WASM=1 --no-entry -O3 -s FILESYSTEM=0 --closure 1 -mnontrapping-fptoint -fPIE -pie
LINK_LIBRARIES = lib/libjxl_extras-internal.a lib/libjxl_threads.a third_party/sjpeg/libsjpeg.a lib/libjxl-internal.a third_party/brotli/libbrotlidec.a third_party/brotli/libbrotlicommon.a third_party/brotli/libbrotlienc.a lib/libjxl_cms.a lib/libjpegli-static.a third_party/highway/libhwy.a
OBJECT_DIR = tools/wasm_demo/CMakeFiles/jxl_decoder.dir
POST_BUILD = :
PRE_LINK = :
TARGET_FILE = tools/wasm_demo/jxl_decoder.wasm
TARGET_PDB = jxl_decoder.js.dbg
```
Thanks so much for all the effort put into this project! | Build standalone WASM decoder | https://api.github.com/repos/libjxl/libjxl/issues/3860/comments | 2 | 2024-09-26T22:59:27Z | 2024-09-27T17:44:12Z | https://github.com/libjxl/libjxl/issues/3860 | 2,551,665,688 | 3,860 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
After #3837, CMake can no longer produce build files due to failing atomics check. This only happens with Clang with GNU driver and `-DJXL_STATIC=ON`. This means, MSVC and Clang with MSVC driver (clang-cl) are not affected, and Clang with GNU driver with `-DJXL_STATIC=OFF` is not affected.
```
-- The C compiler identification is Clang 19.1.0 with GNU-like command-line
-- The CXX compiler identification is Clang 19.1.0 with GNU-like command-line
...
-- Performing Test ATOMICS_IN_LIBRARY
-- Performing Test ATOMICS_IN_LIBRARY - Failed
CMake Error at cmake/FindAtomics.cmake:49 (message):
Neither lock free instructions nor -latomic found.
Call Stack (most recent call first):
C:/Users/Alifian/scoop/apps/vcpkg/current/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
CMakeLists.txt:262 (find_package)
```
**To Reproduce**
Steps to reproduce the behavior:
Use `-DJPEGXL_STATIC=ON` together with Clang-GNU driver (`-DCMAKE_CXX_COMPILER=clang++`)
**Environment**
- OS: [e.g. Windows 11 23H2]
- Compiler version: Clang 19.1.0
- CPU type: x86_64 | Failed to generate build files on clang GNU frontend on Windows with `-DJPEGXL_STATIC=ON` | https://api.github.com/repos/libjxl/libjxl/issues/3855/comments | 2 | 2024-09-25T16:07:43Z | 2024-12-02T10:40:52Z | https://github.com/libjxl/libjxl/issues/3855 | 2,548,394,626 | 3,855 |
[
"libjxl",
"libjxl"
] | Some applications require very large images, for example medical slide imaging, where they start at 50k x 50k and routinely reach 300k x 300k. These images are often much larger than available memory and areas must be computed on demand during write.
The order in which pixels will be computed often depends on the pixel source and cannot be set by the write process. Scanline order is the most common.
To support write of images of this type, `JxlEncoderAddChunkedFrame()` needs to offer some guarantees about the order of `data_at()` calls. Just promising that `ypos` will always increase would be enough (this seems to be the current behaviour in v0.11, fortunately).
In discussion in #libjxl on discord it was suggested that this guarantee should perhaps be enabled with a flag setting so as not to constrain future implementations. | add guarantees about data_at() ordering for chunked write | https://api.github.com/repos/libjxl/libjxl/issues/3853/comments | 2 | 2024-09-25T09:41:30Z | 2024-09-25T15:54:31Z | https://github.com/libjxl/libjxl/issues/3853 | 2,547,493,718 | 3,853 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
You can do `make install` but `make uninstall` is not supported.
**To Reproduce**
configure the project using cmake
make
make install
make uninstall
**Expected behavior**
`make uninstall` should lead to the de-installation of the software.
**Screenshots**
na
**Environment**
- OS: Ubuntu
- Compiler version: clang 18
- CPU type: x86_64
**Additional context**
na
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| No uninstall make target | https://api.github.com/repos/libjxl/libjxl/issues/3851/comments | 1 | 2024-09-25T02:22:45Z | 2024-12-02T10:33:52Z | https://github.com/libjxl/libjxl/issues/3851 | 2,546,752,253 | 3,851 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When trying to save an image in lossless mode with `exponent_bits_per_sample = 5`, it fails with the following:
```
./lib/jxl/enc_modular.cc:291: JXL_FAILURE: 0.999994 is losing precision (mant: 7fff99)
./lib/jxl/enc_modular.cc:291: JXL_FAILURE: 0.999994 is losing precision (mant: 7fff99)
./lib/jxl/enc_modular.cc:291: JXL_FAILURE: 0.999994 is losing precision (mant: 7fff99)
./lib/jxl/enc_modular.cc:291: JXL_FAILURE: 0.999994 is losing precision (mant: 7fff99)
./lib/jxl/enc_modular.cc:607: JXL_FAILURE: Error in float to integer conversion
./lib/jxl/enc_frame.cc:1333: JXL_RETURN_IF_ERROR code=1: modular_frame_encoder->ComputeEncodingData( *frame_header, *ib.metadata(), &opsin, *extra_channels, lossy_frame_encoder.State(), cms, pool, aux_out, frame_header->encoding == FrameEncoding::kModular)
./lib/jxl/encode.cc:945: Failed to encode frame
```
**To Reproduce**
Try the above, passing a 32 bits float buffer to libjxl. I used the [debian logo](https://www.debian.org/logos/openlogo-100.png) but it seems to fails with basically any image.
**Expected behavior**
I expected it to just work, like it does if we ask for lossless 8 bits or 16 bits integer. There is a loss of precision but it's expected because of the target pixel format.
**Environment**
- OS: Debian and Windows
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.9.2 [AVXX2,SSE4,SSE2], also reproduced on 0.7 and 0.11
| Saving 16-bit float lossless image should not fail because losing precision | https://api.github.com/repos/libjxl/libjxl/issues/3844/comments | 0 | 2024-09-22T18:34:45Z | 2024-09-23T08:16:28Z | https://github.com/libjxl/libjxl/issues/3844 | 2,541,201,393 | 3,844 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Some warnings that appear when compiling
```
# cmake --build .
[93/318] Building CXX object lib/CMakeFiles/jxl_cms.dir/__/third_party/skcms/skcms.cc.obj
In file included from D:/work/libjxl/third_party/skcms/skcms.cc:2315:
In function 'D baseline::cast(const S&) [with D = __vector(4) float; S = __vector(4) float]',
inlined from 'baseline::U16 baseline::U16_from_F(F)' at D:/work/libjxl/third_party/skcms/src/Transform_inl.h:597:36,
inlined from 'void baseline::Exec_store_161616LE_k(NoCtx, const char*, char*, F&, F&, F&, F&, int)' at D:/work/libjxl/third_party/skcms/src/Transform_inl.h:1280:30,
inlined from 'void baseline::Exec_store_161616LE(const void*, const char*, char*, F&, F&, F&, F&, int)' at D:/work/libjxl/third_party/skcms/src/Transform_inl.h:1268:1,
inlined from 'void baseline::exec_ops(const skcms_private::Op*, const void**, const char*, char*, int)' at D:/work/libjxl/third_party/skcms/src/Transform_inl.h:1446:13:
D:/work/libjxl/third_party/skcms/src/Transform_inl.h:119:14: warning: 'd' may be used uninitialized [-Wmaybe-uninitialized]
119 | d[i] = v[i];
| ~~~~~^~~~
D:/work/libjxl/third_party/skcms/src/Transform_inl.h: In function 'void baseline::exec_ops(const skcms_private::Op*, const void**, const char*, char*, int)':
D:/work/libjxl/third_party/skcms/src/Transform_inl.h:117:7: note: 'd' was declared here
117 | D d;
| ^
In function 'D baseline::cast(const S&) [with D = __vector(4) float; S = __vector(4) float]',
inlined from 'baseline::U16 baseline::U16_from_F(F)' at D:/work/libjxl/third_party/skcms/src/Transform_inl.h:597:36,
inlined from 'void baseline::Exec_store_161616LE_k(NoCtx, const char*, char*, F&, F&, F&, F&, int)' at D:/work/libjxl/third_party/skcms/src/Transform_inl.h:1281:30,
inlined from 'void baseline::Exec_store_161616LE(const void*, const char*, char*, F&, F&, F&, F&, int)' at D:/work/libjxl/third_party/skcms/src/Transform_inl.h:1268:1,
inlined from 'void baseline::exec_ops(const skcms_private::Op*, const void**, const char*, char*, int)' at D:/work/libjxl/third_party/skcms/src/Transform_inl.h:1446:13:
D:/work/libjxl/third_party/skcms/src/Transform_inl.h:119:14: warning: 'd' may be used uninitialized [-Wmaybe-uninitialized]
119 | d[i] = v[i];
| ~~~~~^~~~
D:/work/libjxl/third_party/skcms/src/Transform_inl.h: In function 'void baseline::exec_ops(const skcms_private::Op*, const void**, const char*, char*, int)':
D:/work/libjxl/third_party/skcms/src/Transform_inl.h:117:7: note: 'd' was declared here
117 | D d;
| ^
In function 'D baseline::cast(const S&) [with D = __vector(4) float; S = __vector(4) float]',
inlined from 'baseline::U16 baseline::U16_from_F(F)' at D:/work/libjxl/third_party/skcms/src/Transform_inl.h:597:36,
inlined from 'void baseline::Exec_store_161616LE_k(NoCtx, const char*, char*, F&, F&, F&, F&, int)' at D:/work/libjxl/third_party/skcms/src/Transform_inl.h:1282:30,
inlined from 'void baseline::Exec_store_161616LE(const void*, const char*, char*, F&, F&, F&, F&, int)' at D:/work/libjxl/third_party/skcms/src/Transform_inl.h:1268:1,
inlined from 'void baseline::exec_ops(const skcms_private::Op*, const void**, const char*, char*, int)' at D:/work/libjxl/third_party/skcms/src/Transform_inl.h:1446:13:
D:/work/libjxl/third_party/skcms/src/Transform_inl.h:119:14: warning: 'd' may be used uninitialized [-Wmaybe-uninitialized]
119 | d[i] = v[i];
| ~~~~~^~~~
D:/work/libjxl/third_party/skcms/src/Transform_inl.h: In function 'void baseline::exec_ops(const skcms_private::Op*, const void**, const char*, char*, int)':
D:/work/libjxl/third_party/skcms/src/Transform_inl.h:117:7: note: 'd' was declared here
117 | D d;
| ^
[213/318] Building CXX object lib/CMakeFiles/jxl_enc-obj.dir/jxl/encode.cc.obj
In member function 'jxl::Status JxlEncoderOutputProcessorWrapper::SetAvailOut(uint8_t**, size_t*)',
inlined from 'jxl::Status JxlEncoderOutputProcessorWrapper::SetAvailOut(uint8_t**, size_t*)' at D:/work/libjxl/lib/jxl/encode.cc:183:13,
inlined from 'jxl::Status JxlEncoderOutputProcessorWrapper::CopyOutput(std::vector<unsigned char>&, uint8_t*, size_t&)' at D:/work/libjxl/lib/jxl/encode.cc:195:5:
D:/work/libjxl/lib/jxl/encode.cc:187:13: warning: storing the address of local variable 'next_out' in '*this.JxlEncoderOutputProcessorWrapper::next_out_' [-Wdangling-pointer=]
187 | next_out_ = next_out;
| ~~~~~~~~~~^~~~~~~~~~
D:/work/libjxl/lib/jxl/encode.cc: In member function 'jxl::Status JxlEncoderOutputProcessorWrapper::CopyOutput(std::vector<unsigned char>&, uint8_t*, size_t&)':
D:/work/libjxl/lib/jxl/encode.cc:193:44: note: 'next_out' declared here
193 | std::vector<uint8_t>& output, uint8_t* next_out, size_t& avail_out) {
| ~~~~~~~~~^~~~~~~~
D:/work/libjxl/lib/jxl/encode.cc:193:71: note: 'this' declared here
193 | std::vector<uint8_t>& output, uint8_t* next_out, size_t& avail_out) {
| ^
[282/318] Linking CXX executable third_party\highway\hwy_list_targets.exe
Config: emu128:0 scalar:0 static:0 all_attain:0 is_test:0
Compiled HWY_TARGETS: AVX2 SSE4 SSE2
HWY_ATTAINABLE_TARGETS: AVX2 SSE4 SSE2 EMU128
HWY_BASELINE_TARGETS: SSE2 EMU128
HWY_STATIC_TARGET: SSE2
HWY_BROKEN_TARGETS:
HWY_DISABLED_TARGETS: AVX3_SPR AVX3_ZEN4 AVX3 SSSE3 Unknown Unknown Unknown Unknown Unknown
Current CPU supports: AVX2 SSE4 SSSE3 SSE2 EMU128 SCALAR
[289/318] Building CXX object plugins/gimp/CMakeFiles/file-jxl.dir/file-jxl-load.cc.obj
D:/work/libjxl/plugins/gimp/file-jxl-load.cc: In function 'bool jxl::LoadJpegXlImage(const gchar*, gint32*)':
D:/work/libjxl/plugins/gimp/file-jxl-load.cc:364:54: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=]
364 | temp_frame_name = g_strdup_printf("Frame %lu", layer_idx + 1);
| ~~^ ~~~~~~~~~~~~~
| | |
| | size_t {aka long long unsigned int}
| long unsigned int
| %llu
[318/318] Linking CXX executable tools\cjpegli.exe
```
**To Reproduce**
Refer to the official documentation to configure the environment and compile, but do not use clang
https://github.com/libjxl/libjxl/blob/main/doc/developing_in_windows_msys.md
**Expected behavior**
No warning message will appear
**Environment**
- OS: Windows 11 24H2
- Compiler version: Ninja
- CPU type: x86_64
- cjxl/djxl version string: Versions on the main branch
| Some warnings that appear when compiling | https://api.github.com/repos/libjxl/libjxl/issues/3843/comments | 0 | 2024-09-22T09:10:26Z | 2024-09-23T08:15:59Z | https://github.com/libjxl/libjxl/issues/3843 | 2,540,884,899 | 3,843 |
[
"libjxl",
"libjxl"
] | `jxlinfo` used to take around 20 kb, but now it takes more than 1.0 MB. Other binaries also got bigger, like `djxl` and `cjxl`. Is there any particular reason for that?
Tested on PorteuX 1.7 dev branch, and Arch in [testing](https://archlinux.org/packages/extra-testing/x86_64/libjxl/). | jxlinfo bin size got much bigger since 0.11.0 | https://api.github.com/repos/libjxl/libjxl/issues/3841/comments | 5 | 2024-09-19T23:46:16Z | 2024-09-23T09:03:19Z | https://github.com/libjxl/libjxl/issues/3841 | 2,537,532,474 | 3,841 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
A case where specific animation frames cause artifacts in the bottom right corner of the image.
The bug doesn't seem to depend on the content of the frames, only on their sizes and crop_x0, crop_y0.
Also, results differ across encodings with the same parameters.
**To Reproduce**
```c++
pixel_format = {4, JXL_TYPE_UINT8, JXL_NATIVE_ENDIAN, 0};
JxlEncoderSetFrameLossless(frame_settings, JXL_TRUE);
// Bug occurs only when using effort 5 and above
JxlEncoderFrameSettingsSetOption(frame_settings, JXL_ENC_FRAME_SETTING_EFFORT, 5);
JxlEncoderFrameSettingsSetOption(frame_settings, JXL_ENC_FRAME_SETTING_PATCHES, 0);
basic_info.num_extra_channels = 1;
basic_info.uses_original_profile = JXL_TRUE;
basic_info.have_animation = JXL_TRUE;
frame_header.duration = duration;
frame_header.layer_info.save_as_reference = 1;
frame_header.layer_info.blend_info.source = 1;
frame_header.layer_info.blend_info.blendmode = JXL_BLEND_BLEND;
...
for (const auto& frame: frames) {
frame_header.layer_info.have_crop = JXL_TRUE;
frame_header.layer_info.crop_x0 = frame.x0;
frame_header.layer_info.crop_y0 = frame.y0;
frame_header.layer_info.xsize = frame.cols;
frame_header.layer_info.ysize = frame.rows;
JxlEncoderSetFrameHeader(frame_settings, &frame_header);
JxlEncoderAddImageFrame(
frame_settings, &pixel_format,
static_cast<const void *>(frame.data),
frame.total() * frame.elemSize()));
}
```
**Screenshots**
| expected frame №3 | encoded frame №3 |
| - | - |
|  |  |
```log
frame 1: full image size, duration: 500.0 ms
frame 2: 2223x3072 at position (184,312), duration: 500.0 ms
frame 3: 2223x2152 at position (184,1232), duration: 500.0 ms
```
| encode 1| encode 2 | encode 3|
| - | - | - |
|  |  |  |
Zip archive with source images and results: [Archive.zip](https://github.com/user-attachments/files/17051155/Archive.zip)
**Environment**
- OS: openSUSE Tumbleweed
- CPU type: x86_64
- libjxl version: 0.10.3
**Additional context**
djxl and jxl-oxide decode these images in the same way
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| Artefacts after encoding lossless animation frames with crop and blending | https://api.github.com/repos/libjxl/libjxl/issues/3840/comments | 4 | 2024-09-18T22:59:55Z | 2024-09-24T05:29:51Z | https://github.com/libjxl/libjxl/issues/3840 | 2,534,918,141 | 3,840 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
The `/MT` option is applied instead of the `/MTd` option in a statically linked debug build with Visual Studio.
There is an issue with commit b5cb2464c6d42c3688b4f51e5101adf2ae291bfd(#3803).
**To Reproduce**
Build with the `-DCMAKE_BUILD_TYPE=Debug` option and the `-DJPEGXL_STATIC=ON` option.
**Expected behavior**
The `/MTd` option is applied.
**Environment**
- OS: Windows 11 23H2
- Compiler version: cl.exe Version 19.41.34120 for x64
- CPU type: x86_64
**Additional context**
I have two proposals for a fix.
- Proposal 1
Replace the following code in `CMakeLists.txt`:
```cmake
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
```
with:
```cmake
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
```
- Proposal 2
1. Remove the following code in `CMakeLists.txt`:
```cmake
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
```
2. Add the `-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>"` option to cmake.exe.
I would prefer Proposal 2 for general purpose.
**Reference**
[CMAKE_MSVC_RUNTIME_LIBRARY](https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html) | An incorrect MSVC option is applied in a debug build with static linking | https://api.github.com/repos/libjxl/libjxl/issues/3834/comments | 6 | 2024-09-16T10:19:58Z | 2024-09-23T21:52:33Z | https://github.com/libjxl/libjxl/issues/3834 | 2,528,055,560 | 3,834 |
[
"libjxl",
"libjxl"
] | I just downloaded the latest libjxl release from here.
Now I run cmake:
cmake -DCMAKE_INSTALL_PREFIX=/usr .
And I get this result:
-- The C compiler identification is GNU 15.0.0
-- The CXX compiler identification is GNU 15.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_SYSTEM_PROCESSOR is x86_64
-- Performing Test CXX_FUZZERS_SUPPORTED
-- Performing Test CXX_FUZZERS_SUPPORTED - Failed
-- Performing Test CXX_MACRO_PREFIX_MAP
-- Performing Test CXX_MACRO_PREFIX_MAP - Success
-- Performing Test CXX_NO_RTTI_SUPPORTED
-- Performing Test CXX_NO_RTTI_SUPPORTED - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Performing Test JXL_HWY_DISABLED_TARGETS_FORCED
-- Performing Test JXL_HWY_DISABLED_TARGETS_FORCED - Failed
-- libjpeg-turbo submodule is absent; not enabling jpegli
-- Compiled IDs C:GNU, C++:GNU
-- Disabled AVX512 (set JPEGXL_ENABLE_AVX512 to enable it)
-- Disabled AVX512_SPR (set JPEGXL_ENABLE_AVX512_SPR to enable it)
-- Disabled AVX512_ZEN4 (set JPEGXL_ENABLE_AVX512_ZEN4 to enable it)
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS - Success
-- Found GTest: /usr/lib/cmake/GTest/GTestConfig.cmake (found version "1.14.0")
-- Found HWY: /usr/lib/libhwy.so (found suitable version "1.2.0", minimum required is "1.0.7")
-- Checking for module 'libbrotlicommon'
-- Found libbrotlicommon, version 1.1.0
-- Checking for module 'libbrotlienc'
-- Found libbrotlienc, version 1.1.0
-- Checking for module 'libbrotlidec'
-- Found libbrotlidec, version 1.1.0
-- Found Brotli: /usr/include
Ok - I get this error:
CMake Error at third_party/CMakeLists.txt:100 (message):
Please run /depot/jjj/libjxl-0.11.0/deps.sh to fetch the build
dependencies.
-- Configuring incomplete, errors occurred!
So what is the problem?
There are two problems.
The smaller one is the assumption that I want to call deps.sh. I don't.
I want to manage ALL dependencies on my system on my own. But
this is the smaller problem.
The larger problem is ... the above does not tell me what is missing.
It claims it is all fine:
-- Found GTest: /usr/lib/cmake/GTest/GTestConfig.cmake (found version "1.14.0")
-- Found HWY: /usr/lib/libhwy.so (found suitable version "1.2.0", minimum required is "1.0.7")
-- Checking for module 'libbrotlicommon'
-- Found libbrotlicommon, version 1.1.0
-- Checking for module 'libbrotlienc'
-- Found libbrotlienc, version 1.1.0
-- Checking for module 'libbrotlidec'
-- Found libbrotlidec, version 1.1.0
-- Found Brotli: /usr/include
But, evidently, something must be wrong, yet cmake swallows that information.
Could the cmake-system be adapted to show WHAT exactly is missing? I compile everything
from source via ruby, so it is trivial to add missing dependency, but in order for this to work
I need to know what the problem is. Right now I am not told what error exists.
Perhaps it is in regards to brotli, but even then I think the cmake system should notify the
user about this issue.
Either way thank you for reading and perhaps considering the above. | [Request] Please provide better error messages in the cmake-system as to what is missing | https://api.github.com/repos/libjxl/libjxl/issues/3830/comments | 0 | 2024-09-16T01:11:34Z | 2024-09-16T06:57:27Z | https://github.com/libjxl/libjxl/issues/3830 | 2,527,324,438 | 3,830 |
[
"libjxl",
"libjxl"
] | There are binary releases for Ubuntu 22.04 and 20.04 (like [jxl-debs-amd64-ubuntu-22.04-v0.11.0.tar.gz](https://github.com/libjxl/libjxl/releases/download/v0.11.0/jxl-debs-amd64-ubuntu-22.04-v0.11.0.tar.gz)) but not 24.04.
I know that packaging this isn't your primary fucus and it's expected to be done by vendors, but since you already provide for older versions, this might be added. | Package also for Ubuntu 24.04 | https://api.github.com/repos/libjxl/libjxl/issues/3829/comments | 1 | 2024-09-15T22:59:53Z | 2024-09-16T08:05:57Z | https://github.com/libjxl/libjxl/issues/3829 | 2,527,247,088 | 3,829 |
[
"libjxl",
"libjxl"
] | Credentials are invalid for the scorecard GitHub action, causing it to fail CI tests.
| Broken scorecard GitHub credentials | https://api.github.com/repos/libjxl/libjxl/issues/3827/comments | 1 | 2024-09-14T23:38:37Z | 2024-09-16T08:02:04Z | https://github.com/libjxl/libjxl/issues/3827 | 2,526,657,488 | 3,827 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Images encoded with `cjxl -d 1 -p` cannot be decoded progressively, due to group placement.
**To Reproduce**
Encode any image with:
```
cjxl -d 1 -p input.png output.jxl
```
Check group placement with jxl-oxide:
```console
$ jxl-oxide -I --with-offset output.jxl
JPEG XL image (BareCodestream)
[...]
Frame #0 (keyframe)
VarDCT (lossy)
Frame type: Regular
5472x3648; (0, 0)
Offset (in codestream): 17 (0x11)
Frame header size: 1439 (0x59f) bytes
Group sizes, in bitstream order:
LfGlobal: 2417 (0x971) bytes
LfGroup(0): 89644 (0x15e2c) bytes
GroupPass { pass_idx: 0, group_idx: 0 }: 534 (0x216) bytes
GroupPass { pass_idx: 0, group_idx: 1 }: 476 (0x1dc) bytes
GroupPass { pass_idx: 0, group_idx: 2 }: 393 (0x189) bytes
[...]
GroupPass { pass_idx: 1, group_idx: 327 }: 1789 (0x6fd) bytes
GroupPass { pass_idx: 1, group_idx: 328 }: 1697 (0x6a1) bytes
GroupPass { pass_idx: 1, group_idx: 329 }: 543 (0x21f) bytes
HfGlobal: 22301 (0x571d) bytes
```
It will show interleaved `LfGroup` and `PassGroup`, and `HfGlobal` comes last, which isn't progressive enough because decoder cannot complete 8x downsampled image earlier, and `PassGroup`'s cannot be used until the end.
**Expected behavior**
- Full 8x downsampled image is sent first.
- `HfGlobal` is sent before `PassGroup`.
**Environment**
```console
$ clang --version
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: arm64-apple-darwin24.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ cjxl
JPEG XL encoder v0.12.0 7609879f [NEON_BF16,NEON]
``` | Lossy progressive images encoded by cjxl are not actually progressive | https://api.github.com/repos/libjxl/libjxl/issues/3823/comments | 2 | 2024-09-14T03:59:16Z | 2025-05-02T15:57:44Z | https://github.com/libjxl/libjxl/issues/3823 | 2,525,976,052 | 3,823 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Attempting to generate a jxl file using `jxl_from_tree`, when either the width or height exceeds 2048, results in wrong output.
**To Reproduce**
Run `jxl_from_tree` with this tree as input:
```
Bitdepth 8
Width 2049
Height 2048
- Set 255
```
**Expected behavior**
The resulting image should be white. In this case, it decodes to black.
**Screenshots**
[Black jxl image generated from tree](https://github.com/user-attachments/files/16990890/out.jxl.zip)
**Environment**
- OS: Linux
- Compiler version: gcc version 14.2.1
- CPU type: x86_64
- cjxl/djxl version string: v0.11.0 4c3ab013 [AVX2,SSE4,SSE2]
**Additional context**
The issue reproduces slightly differently on https://jxl-art.surma.technology/. In addition to the image being black, the size of the generated jxl file also varies between runs, which does not happen on my machine when running a debug build of `jxl_from_tree`.
Setting `int buffering = 0;` in `enc_params.h` seems to work around the issue. | jxl_from_tree is broken for dimensions > 2048 | https://api.github.com/repos/libjxl/libjxl/issues/3818/comments | 1 | 2024-09-13T08:40:15Z | 2025-04-27T02:24:20Z | https://github.com/libjxl/libjxl/issues/3818 | 2,524,242,090 | 3,818 |
[
"libjxl",
"libjxl"
] | JPEG XL encoder v0.10.3 0.10.3 [NEON]
Encoding [VarDCT, d4.600, effort: 7]
[1] 13566 trace trap cjxl -q 50 /Users/johanvillibert/untitled\ folder/1.png agentsmith.jxl
this is the error, some png files don't get converted for some reason
Edit: MacOs, 14.5 sonoma, M1
| 13566 trace trap | https://api.github.com/repos/libjxl/libjxl/issues/3812/comments | 1 | 2024-09-12T10:07:13Z | 2024-09-16T05:37:54Z | https://github.com/libjxl/libjxl/issues/3812 | 2,521,945,999 | 3,812 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
309b637 introduced support for stdin and stdout, and while stdin works in CMD, it doesn't work in PowerShell.
**To Reproduce**
```PowerShell
❯ cjxl "image.png" - | djxl - --disable_output
JPEG XL encoder v0.11.0 3786abb [AVX2,SSE2]
Encoding [VarDCT, d1.000, effort: 7]
Compressed to 1399.3 kB (1.265 bpp).
2975 x 2975, 2.528 MP/s [2.53, 2.53], , 1 reps, 4 threads.
JPEG XL decoder v0.11.0 3786abb [AVX2,SSE2]
DecompressJxlToPackedPixelFile failed
```
**Expected behavior / Workaround using CMD**
```PowerShell
❯ cmd /c 'cjxl "image.png" - | djxl - --disable_output'
JPEG XL encoder v0.11.0 3786abb [AVX2,SSE2]
JPEG XL decoder v0.11.0 3786abb [AVX2,SSE2]
Encoding [VarDCT, d1.000, effort: 7]
Compressed to 1399.3 kB (1.265 bpp).
2975 x 2975, 2.610 MP/s [2.61, 2.61], , 1 reps, 4 threads.
Decoded to pixels.
2975 x 2975, 36.047 MP/s [36.05, 36.05], , 1 reps, 4 threads.
```
**Environment**
- OS: Windows 11 23H2
- Compiler version: Unknown; I just used the binaries from [lucaversari](https://artifacts.lucaversari.it/libjxl/libjxl/latest/jxl-x64-windows-static.zip).
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.11.0 3786abb [AVX2,SSE2]
**Additional context**
- PowerShell version: 5.1.22621.4111 | Unable to read stdin in PowerShell 5.1 | https://api.github.com/repos/libjxl/libjxl/issues/3808/comments | 2 | 2024-09-08T12:46:07Z | 2025-01-09T15:05:02Z | https://github.com/libjxl/libjxl/issues/3808 | 2,512,371,306 | 3,808 |
[
"libjxl",
"libjxl"
] | Build following instructions in BUILDING.md with:
**cd libjxl
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF ..**
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_SYSTEM_PROCESSOR is i686
-- Performing Test CXX_FUZZERS_SUPPORTED
-- Performing Test CXX_FUZZERS_SUPPORTED - Failed
-- Performing Test CXX_MACRO_PREFIX_MAP
-- Performing Test CXX_MACRO_PREFIX_MAP - Success
-- Performing Test CXX_NO_RTTI_SUPPORTED
-- Performing Test CXX_NO_RTTI_SUPPORTED - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Performing Test JXL_HWY_DISABLED_TARGETS_FORCED
-- Performing Test JXL_HWY_DISABLED_TARGETS_FORCED - Failed
-- Compiled IDs C:GNU, C++:GNU
-- Disabled AVX512 (set JPEGXL_ENABLE_AVX512 to enable it)
-- Disabled AVX512_SPR (set JPEGXL_ENABLE_AVX512_SPR to enable it)
-- Disabled AVX512_ZEN4 (set JPEGXL_ENABLE_AVX512_ZEN4 to enable it)
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS - Success
-- Performing Test HWY_EMSCRIPTEN
-- Performing Test HWY_EMSCRIPTEN - Failed
-- Performing Test HWY_RISCV
-- Performing Test HWY_RISCV - Failed
-- Looking for sys/auxv.h
-- Looking for sys/auxv.h - found
-- Looking for asm/hwcap.h
-- Looking for asm/hwcap.h - not found
-- Build type is 'Release'
-- Performing Test BROTLI_EMSCRIPTEN
-- Performing Test BROTLI_EMSCRIPTEN - Failed
-- Compiler is not EMSCRIPTEN
-- Looking for log2
-- Looking for log2 - not found
-- Looking for log2
-- Looking for log2 - found
-- Found ZLIB: /usr/lib/i386-linux-gnu/libz.so (found version "1.2.11")
-- Found PNG: /usr/lib/i386-linux-gnu/libpng.so (found version "1.6.37")
-- Performing Test SJPEG_HAVE_FLAG___SSE2__
-- Performing Test SJPEG_HAVE_FLAG___SSE2__ - Failed
-- Performing Test SJPEG_HAVE_FLAG___SSE2__
-- Performing Test SJPEG_HAVE_FLAG___SSE2__ - Success
-- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__
-- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__ - Failed
-- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__
-- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__ - Failed
-- Found JPEG: /usr/lib/i386-linux-gnu/libjpeg.so (found version "62")
-- Found OpenGL: /usr/lib/i386-linux-gnu/libOpenGL.so
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- Looking for __GLIBCXX__
-- Looking for __GLIBCXX__ - found
-- Looking for _LIBCPP_VERSION
-- Looking for _LIBCPP_VERSION - not found
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Performing Test CXX_WPSABI_SUPPORTED
-- Performing Test CXX_WPSABI_SUPPORTED - Success
-- Performing Test LINKER_SUPPORT_EXCLUDE_LIBS
-- Performing Test LINKER_SUPPORT_EXCLUDE_LIBS - Success
-- Found GIF: /usr/lib/i386-linux-gnu/libgif.so (found suitable version "5.1.9", minimum required is "5.1")
-- Checking for module 'OpenEXR'
-- Found OpenEXR, version 2.5.4
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.1") found components: doxygen dot
CMake Warning at CMakeLists.txt:419 (message):
sphinx-build not found, skipping rtd documentation
-- Found Python3: /usr/bin/python3.9 (found version "3.9.2") found components: Interpreter
-- Building with JPEGXL_VERSION=4a3b22d2 (auto-updated)
-- Checking for module 'libwebp'
-- Found libwebp, version 0.6.1
-- Checking for module 'libavif'
-- Found libavif, version 0.8.4
-- Building tools: cjxl;djxl;jxlinfo;cjpegli;djpegli;benchmark_xl
-- Configuring done
-- Generating done
-- Build files have been written to: /home/brent/git/libjxl/build
**cmake --build . -- -j$(nproc)**
...
[ 4%] Building C object third_party/brotli/CMakeFiles/brotlicommon.dir/c/common/shared_dictionary.c.o
**_**a2x: ERROR: "xmllint" --nonet --noout --valid "/home/brent/git/libjxl/build/cjxl.xml" returned non-zero exit status 4**_**
gmake[2]: *** [CMakeFiles/manpages.dir/build.make:81: cjxl.1] Error 1
gmake[2]: *** Waiting for unfinished jobs....
**Environment**
Debian 11 (x86)
tried both clang and gcc
**Additional context**
The problem appears to be that the xmllint is passed the --nonet option, but line 2 of build/cjxl.xml is:
_DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"_
which is trying to fetch from the network.
The build succeeds without docs using:
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_MANPAGES=0 ..
| Cannot build with docs | https://api.github.com/repos/libjxl/libjxl/issues/3795/comments | 4 | 2024-09-05T00:47:53Z | 2024-10-11T18:42:19Z | https://github.com/libjxl/libjxl/issues/3795 | 2,506,545,497 | 3,795 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Libjxl consumes huge amounts of heap memory ( 3,393,388,337 bytes) while decoding this tiny (127 bytes!) file
With a somewhat older libxl, there was also this unusual exception:
```
zsh: illegal hardware instruction (core dumped)
```
**To Reproduce**
```
djxl 5791454446813184-tc2.jxl crap.pnm
```
With this test case:

**Expected behavior**
Libjxl should detect an irrational request and reject decoding prior to allocating huge amounts of memory.
**Screenshots**
```
% LD_PRELOAD=/lib/x86_64-linux-gnu/libmemusage.so djxl 5791454446813184-tc2.jxl crap.pnm
JPEG XL decoder v0.11.0 ba759b42 [AVX2,SSE4,SSE2]
Failed to decode image
DecompressJxlToPackedPixelFile failed
Memory usage summary: heap total: 997603716677, heap peak: 3393388337, stack peak: 7552
total calls total memory failed calls
malloc| 639 997603709957 1
realloc| 0 0 0 (nomove:0, dec:0, free:0)
calloc| 12 6720 0
free| 729 3393410181
Histogram for block sizes:
0-15 105 16% ==================================================
16-31 92 14% ===========================================
32-47 60 9% ============================
48-63 32 4% ===============
64-79 63 9% ==============================
80-95 28 4% =============
96-111 4 <1% =
112-127 1 <1%
128-143 72 11% ==================================
160-175 3 <1% =
176-191 2 <1%
192-207 4 <1% =
240-255 2 <1%
256-271 42 6% ====================
304-319 2 <1%
320-335 9 1% ====
368-383 1 <1%
464-479 1 <1%
512-527 20 3% =========
528-543 39 5% ==================
576-591 2 <1%
720-735 16 2% =======
752-767 1 <1%
880-895 1 <1%
992-1007 1 <1%
1024-1039 2 <1%
1040-1055 4 <1% =
1072-1087 13 1% ======
1440-1455 2 <1%
1536-1551 1 <1%
1648-1663 1 <1%
2176-2191 2 <1%
2304-2319 7 1% ===
2816-2831 1 <1%
2960-2975 1 <1%
3200-3215 1 <1%
4096-4111 1 <1%
4352-4367 2 <1%
4560-4575 1 <1%
5504-5519 1 <1%
7808-7823 3 <1% =
9520-9535 2 <1%
large 3 <1% =
```
**Environment**
- OS: Ubuntu 22.04 LTS
- Compiler version: clang 14.0.0-1
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.11.0 ba759b42 [AVX2,SSE4,SSE2]
**Additional context**
None
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| Extreme memory usage during JXL decode (GraphicsMagick oss-fuzz 69728 test case #2) | https://api.github.com/repos/libjxl/libjxl/issues/3793/comments | 1 | 2024-09-04T13:03:44Z | 2024-09-06T21:36:50Z | https://github.com/libjxl/libjxl/issues/3793 | 2,505,315,674 | 3,793 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Libjxl consumes huge amounts of heap memory (3,974,582,644 bytes) while decoding this tiny file
**To Reproduce**
```
djxl 5791454446813184-tc1.jxl crap.pnm
```
With this test case:

**Expected behavior**
Libjxl should detect an irrational request and reject decoding prior to allocating huge amounts of memory.
**Screenshots**
```
% LD_PRELOAD=/lib/x86_64-linux-gnu/libmemusage.so djxl 5791454446813184-tc1.jxl crap.pnm
JPEG XL decoder v0.11.0 ba759b42 [AVX2,SSE4,SSE2]
Failed to decode image
DecompressJxlToPackedPixelFile failed
Memory usage summary: heap total: 1199866109624, heap peak: 3974582644, stack peak: 7552
total calls total memory failed calls
malloc| 631 1199866102904 1
realloc| 0 0 0 (nomove:0, dec:0, free:0)
calloc| 12 6720 0
free| 721 3974900984
Histogram for block sizes:
0-15 104 16% ==================================================
16-31 90 13% ===========================================
32-47 61 9% =============================
48-63 31 4% ==============
64-79 63 9% ==============================
80-95 27 4% ============
96-111 6 <1% ==
128-143 72 11% ==================================
144-159 1 <1%
160-175 3 <1% =
176-191 2 <1%
192-207 4 <1% =
240-255 2 <1%
256-271 42 6% ====================
304-319 2 <1%
320-335 9 1% ====
368-383 1 <1%
384-399 1 <1%
432-447 11 1% =====
448-463 1 <1%
464-479 1 <1%
512-527 18 2% ========
528-543 39 6% ==================
576-591 2 <1%
752-767 1 <1%
864-879 2 <1%
880-895 1 <1%
992-1007 1 <1%
1040-1055 4 <1% =
1072-1087 13 2% ======
1456-1471 1 <1%
1536-1551 1 <1%
1648-1663 1 <1%
2960-2975 1 <1%
4096-4111 1 <1%
4560-4575 1 <1%
6912-6927 2 <1%
9520-9535 2 <1%
38912-38927 3 <1% =
40960-40975 7 1% ===
41472-41487 1 <1%
large 7 1% ===
```
**Environment**
- OS: Ubuntu 22.04 LTS
- Compiler version: clang 14.0.0-1
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.11.0 ba759b42 [AVX2,SSE4,SSE2]
**Additional context**
None
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| Extreme memory usage during JXL decode (GraphicsMagick oss-fuzz 69728 test case #1) | https://api.github.com/repos/libjxl/libjxl/issues/3792/comments | 1 | 2024-09-04T12:54:55Z | 2024-09-05T08:57:22Z | https://github.com/libjxl/libjxl/issues/3792 | 2,505,288,342 | 3,792 |
[
"libjxl",
"libjxl"
] | File:
/lib/extras/enc/jpegli.cc line 390
Code:
// We need to declare all the non-trivial destructor local variables
// before the call to setjmp().
std::vector<uint8_t> pixels; // <-- unused | unused variable | https://api.github.com/repos/libjxl/libjxl/issues/3789/comments | 2 | 2024-09-02T11:42:57Z | 2024-09-16T08:16:31Z | https://github.com/libjxl/libjxl/issues/3789 | 2,500,750,507 | 3,789 |
[
"libjxl",
"libjxl"
] | File:
/libjxl-main/tools/jxlinfo.c: line 389
Code:
box_index += chunk_size - remaining;
box_data = realloc(box_data, box_size); // <-- check realloc | check realloc | https://api.github.com/repos/libjxl/libjxl/issues/3788/comments | 2 | 2024-09-02T11:40:40Z | 2024-09-05T13:01:36Z | https://github.com/libjxl/libjxl/issues/3788 | 2,500,745,580 | 3,788 |
[
"libjxl",
"libjxl"
] | I am currently working on a comparative analysis of JPEG-XL and other image compression software. As part of my project, I need to save a 10-bit RGB image to a PNG file and then compress it using JPEG-XL. At present, I am saving the 10-bit RGB image as a 16-bit RGB PNG image and then encoding it using the following command:
```bash
cjxl -e 10 -q 98 input.png output.jxl
```
Subsequently, I am decoding the compressed file with:
```bash
djxl output.jxl dec.png
```
However, I have encountered an issue wherein the decoded file is being encoded as an 8-bit PNG image, resulting in incorrect output.
Could you please advise on the correct procedure to use JPEG-XL for compressing and decoding 16-bit RGB images? Your expertise in this matter would be greatly appreciated, as it is crucial for the accurate completion of my project.
Thank you for your time and assistance. | Inquiry Regarding 16-bit RGB Image Compression Using JPEG-XL | https://api.github.com/repos/libjxl/libjxl/issues/3787/comments | 9 | 2024-09-01T13:32:53Z | 2024-09-04T11:06:13Z | https://github.com/libjxl/libjxl/issues/3787 | 2,499,473,008 | 3,787 |
[
"libjxl",
"libjxl"
] | I'm using cjpegli from jxl-linux-x86_64-static-v0.10.3.tar.gz an it works like a charm.
I want to use it at a raspberry pi too, but it's very hard to build. I gave up after several hours of reinstalling tons of packages to get this fucking cmake run.
I also tried an openSUSE-Tumbleweed-ARM-raspberrypi.aarch64 image. There is already a dynamic package. I was also able to build it dynamic linked (ci.sh opt). But if I try to build it static, it always fail again. (CMakeLists.txt: set(JPEGXL_STATIC true CACHE BOOL "Build tools as static binaries.")) end in missing pthread (find_package(Threads REQUIRED)). But libpthread.so exists as part of glibc6.
So please release this useful tool as static build for AArch64 too, so also non-developer like me can use it. | Please release static builds for AArch64 too | https://api.github.com/repos/libjxl/libjxl/issues/3776/comments | 1 | 2024-08-28T20:18:00Z | 2024-09-05T07:34:37Z | https://github.com/libjxl/libjxl/issues/3776 | 2,492,918,557 | 3,776 |
[
"libjxl",
"libjxl"
] |
**Describe the bug**
Cjxl takes about half a minute to compress a binary image. DjvuLibre is decades old and can compress a binary image in less than a second with superior compression.
**To Reproduce**
You can compare the results on a scan or digital linework with ImageMagick, DjVuLibre, and cjxl. The example photo is 2544x3285. It is a 300DPI scan of an ink drawing. DjVuLibre compresses that image in 1 second with cjb2 from DjvuLibre, but cjxl compresses it at a similar size in 47 seconds.
Generating monochrome images from scan with ImageMagick:
`magick scanned_image.png -monochrome monochrome_image.png`
`magick scanned_image.png -monochrome monochrome_image.pbm`
Compressing with cjxl in 47 seconds:
`cjxl -d 0 -e 9 monochrome_image.png monochrome_image_47_seconds.jxl`
Compressing with cjxl in 81 seconds:
`cjxl -d 0 -e 9 -E 3 monochrome_image.png monochrome_image_81_seconds.jxl`
Compressing with cjxl in 4 seconds:
`cjxl -d 0 monochrome_image.png monochrome_image_4_seconds.jxl`
Compressing in 1 second with cjb2 from DjVuLibre:
`cjb2 monochrome_image.pbm monochrome_image_1_second.djvu`
**LibJXL**
| command | size | time |
|--------------|-----------|------------|
| cjxl -d 0 -e 9 -E 3 | 79314 B | 81 seconds |
| cjxl -d 0 -e 9 | 79314 B | 47 seconds |
| cjxl -d 0 | 100408 B | 4 seconds |
**DjVuLibre**
| command | size | time |
|--------------|-----------|------------|
| cjb2 | 76096 B | <1 second |
**Expected behavior**
In my example photo it should compress down to ~75KB in a few seconds. It should take a small amount of computing time to compress a 1 bit binary image. Since DjvuLibre has been doing this well for years, JXL should be competitive to that.
**Screenshots**
Scanned image source is an example of what artists might wish to transmit over the web when JXL becomes the new web standard. This is before it is formatted as binary using ImageMagick.

Monochrome image that is to be compressed with cjxl and cjb2. This final image is 94KB in JXL after four seconds of compression and 75KB in DjVuLibre after 1 second of compression.

<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| Lossless 1 bit slower than Djvulibre | https://api.github.com/repos/libjxl/libjxl/issues/3775/comments | 8 | 2024-08-28T18:00:53Z | 2024-09-05T12:07:06Z | https://github.com/libjxl/libjxl/issues/3775 | 2,492,693,661 | 3,775 |
[
"libjxl",
"libjxl"
] | im trying to convert my jpgs to jxl most seem to convert fine, but some files give this error.
E:\libjxl>cjxl 0_0009.jpg 0_00091.jxl -v
JPEG XL encoder v0.10.3 4a3b22d [AVX2,SSE2]
Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0).
Read JPEG image with 2710692 bytes.
Encoding [JPEG, lossless transcode, effort: 7]
JPEG bitstream reconstruction data could not be created. Possibly there is too much tail data.
Try using --jpeg_store_metadata 0, to losslessly recompress the JPEG image data without bitstream reconstruction data.
EncodeImageJXL() failed.
whats worse is that when i add --jpeg_store_metadata 0 like so 0_0009.jpg 0_00091.jxl --jpeg_store_metadata 0 i get
E:\libjxl>cjxl 0_0009.jpg 0_00091.jxl --jpeg_store_metadata 0
Unknown argument: --jpeg_store_metadata
Use 'cjxl -h' for more information
Ive been using XL Converter to convert my jpgs, and have contacted them, he seem to think the problem lies with cjxl, and that it could be to do with the metadata, but when i strip the metadata the error still occurs. can anyone help? Thankyou
| Error when tying to convert to jxl | https://api.github.com/repos/libjxl/libjxl/issues/3768/comments | 10 | 2024-08-26T17:28:56Z | 2024-09-05T07:33:09Z | https://github.com/libjxl/libjxl/issues/3768 | 2,487,381,712 | 3,768 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
Procedures like `JxlEncoderInitBasicInfo` have a documentation saying "For forwards-compatibility, this function has to be called before values are assigned to the struct fields.", but in my understanding, it will not do anything for compatibility in many cases.
**Describe the solution you'd like**
A clear and concise description of what kind of compatibility will be preserved (source? ABI?) and under what circumstances.
**Describe alternatives you've considered**
I could ignore my understanding, just do what the docs say, and have complicated code to do something which might actually need a really simple solution.
**Additional context**
I'm trying to extend the [Rust bindings](https://github.com/inflation/jpegxl-rs) for my use case. The bindings don't use the struct definitions from .h headers, but rather use a manually updated copy. This means there is no source forward-compatibility, because every time an extra field is added, that change must be reflected under penalty of crashes.
But the way I see it, the init calls don't provide any binary forward-compatibility no matter what the source language is.
I assume that the need for compatibility arises when the struct gains new fields, and those need to be initialized. So let's consider a typical sequence:
```
// struct JxlInfo {
// uint32_t a_field;
// };
struct JxlInfo *info = malloc(sizeof(info)); // allocs 4 bytes
jxlInitInfo(info);
info->a_field = 1;
```
This works fine in version 0.1. Now we bump to the next version and add a field:
```
struct JxlInfo {
uint32_t a_field;
uint32_t disabled; // added in 0.2
};
void jxlInitInfo(*info) {
info->a_field = 0;
info->disabled = false;
}
```
Running the same code without recompiling:
```
struct JxlInfo *info = malloc(sizeof(info)); // not recompiled; STILL allocs 4 bytes
jxlInitInfo(info); // tries to access info->disabled at offset 4, past the end of the allocated area
```
In this case, the Init procedure just crashes the client application because it doesn't change the allocation size. It can't work any other way as long as it doesn't allocate the data.
This behaviour is very confusing to me and doesn't resemble forward compatibility at all, and eliminates the ability to use dynamically linked libraries, so I'm probably focusing on a different use case than intended.
Could you clarify the docs to make it obvious what the init procedures are for and how/when to use them? | Clarification for "InitStruct" functions | https://api.github.com/repos/libjxl/libjxl/issues/3766/comments | 1 | 2024-08-25T18:31:16Z | 2025-04-12T11:22:46Z | https://github.com/libjxl/libjxl/issues/3766 | 2,485,410,556 | 3,766 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots or example input/output images to help explain your problem.
**Environment**
- OS: [e.g. Windows]
- Compiler version: [e.g. clang 11.0.1]
- CPU type: [e.g. x86_64]
- cjxl/djxl version string: [e.g. cjxl [v0.3.7 | SIMD supported: SSE4,Scalar]]
**Additional context**
Add any other context about the problem here.
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| Bug | https://api.github.com/repos/libjxl/libjxl/issues/3764/comments | 4 | 2024-08-24T08:44:59Z | 2024-09-02T11:04:56Z | https://github.com/libjxl/libjxl/issues/3764 | 2,484,371,228 | 3,764 |
[
"libjxl",
"libjxl"
] | I have the intention to install JPEG-XL Codec on my Windows 11 Notebook, but I didn't understand how to do it. I downloaded the "jxl-x64-windows-static.zip" file but I'm not sure how to install it.
Can somebody please help a noob here? Thanks in advance. | How to install libjxl on Windows? | https://api.github.com/repos/libjxl/libjxl/issues/3763/comments | 1 | 2024-08-23T17:20:46Z | 2024-09-05T07:19:17Z | https://github.com/libjxl/libjxl/issues/3763 | 2,483,560,062 | 3,763 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
```
➜ ./run_bench_jxl.sh
benchmark_xl v0.10.3 0.10.3 [SSE4,SSE2]
./run_bench_jxl.sh: line 7: 88800 Illegal instruction: 4 benchmark_xl --input=*.png --codec=avif:rgb:q100:s8 --inner_threads=8 --num_threads=0 --print_details
```
**To Reproduce**
```
Other modules are used normally, but when avif is turned on, an error is reported.
--codec=avif:rgb:q100:s8
➜ ./run_bench_jxl.sh
benchmark_xl v0.10.3 0.10.3 [SSE4,SSE2]
14 total threads, 1 tasks, 0 threads, 8 inner threads
jxl 1.png error:0 size: 1148017 pixels: 10077696 enc_speed:12.92669139 dec_speed:169.82090413 bpp:0.91133291 dist:1.57742095 psnr:46.78101681 ssimulacra2:83.88 p:0.72378417 bppp:0.65960833 qabpp:1.43755557
1.png
Encoding kPixels Bytes BPP E MP/s D MP/s Max norm SSIMULACRA2 PSNR pnorm BPP*pnorm QABPP Bugs
----------------------------------------------------------------------------------------------------------------------------------------
jxl 10077 1148017 0.9113329 12.927 169.821 1.57742095 83.88443843 46.78 0.72378417 0.659608333734 1.438 0
Aggregate: 10077 1148017 0.9113329 12.927 169.821 1.57742095 83.88443843 46.78 0.72378417 0.659608333734 1.438 0
Allocations: 693 (max bytes in use: 3.253303E+09)
```
**Expected behavior**
Normal operation.
**Environment**
- OS: Apple M3 Max 14.3
- benchmark_xl version string: v0.10.3 0.10.3 [SSE4,SSE2]
| M3 benchmark_xl illegal hardware instruction | https://api.github.com/repos/libjxl/libjxl/issues/3759/comments | 6 | 2024-08-21T10:05:05Z | 2024-09-18T00:56:34Z | https://github.com/libjxl/libjxl/issues/3759 | 2,477,623,308 | 3,759 |
[
"libjxl",
"libjxl"
] | 0.8, 0.7 and 0.6 releases only have dynamically linked builds mislabelled as static, with the most recent 0.8.3 and 0.9.3 releases missing binaries entirely
0.8.2 'Static' release contains DLLs and cjxl fails to run without them
 | Windows Static Releases Aren't Static | https://api.github.com/repos/libjxl/libjxl/issues/3755/comments | 2 | 2024-08-17T01:54:28Z | 2024-09-05T07:15:15Z | https://github.com/libjxl/libjxl/issues/3755 | 2,471,267,951 | 3,755 |
[
"libjxl",
"libjxl"
] | _For additional context see https://github.com/libjxl/libjxl/issues/3530#issuecomment-2277884901._
## **Summary**
This is a small batch of images I have compiled where version 0.8 appears sharper than the master. This lack of sharpness is usually noticeable in images with low entropy, such as artwork and screenshots. It is also present in landscape images, particularly on the shadowed sides of mountains. As a reference, I have included a high entropy example where the master branch performs better than 0.8. All images are compressed to the same bpp at distances of 2.5-3.5.
You can see the full corpus here:
[Part_1.zip](https://github.com/user-attachments/files/16642611/jxl_problem_images_part_1.zip)
[Part_2.zip](https://github.com/user-attachments/files/16642612/jxl_problem_images_part_2.zip)
I might make a part 3 if I find more images.
## **Notable examples**
      | Problematic images where libjxl 0.8 outperforms master | https://api.github.com/repos/libjxl/libjxl/issues/3754/comments | 1 | 2024-08-16T23:57:33Z | 2025-01-16T12:54:50Z | https://github.com/libjxl/libjxl/issues/3754 | 2,471,196,969 | 3,754 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Libjxl and submodules are updated to the latest as of August 15, 2024. The tools/benchmark/benchmark_codec_avif.cc source file fails to compile due to some incompatibility with libavif. Libjxl was previously compiled successfully on July 14, 2024.
**To Reproduce**
The build is done in a 'build' subdirectory using
```
cmake -DCMAKE_INSTALL_RPATH=/usr/local/lib -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF ..
```
**Expected behavior**
I expect the software to compile (as it used to do).
**Screenshots**
```
[ 97%] Building CXX object tools/CMakeFiles/benchmark_xl.dir/benchmark/benchmark_codec_avif.cc.o
/home/bfriesen/src/libjxl/tools/benchmark/benchmark_codec_avif.cc: In function ‘jxl::Status jpegxl::tools::{anonymous}::SetUpAvifColor(const jxl::ColorEncoding&, bool, avifImage*)’:
/home/bfriesen/src/libjxl/tools/benchmark/benchmark_codec_avif.cc:129:31: error: void value not ignored as it ought to be
129 | avifImageSetProfileICC(image, color.ICC().data(), color.ICC().size()));
| ^
/home/bfriesen/src/libjxl/tools/benchmark/benchmark_codec_avif.cc:23:51: note: in definition of macro ‘JXL_RETURN_IF_AVIF_ERROR’
23 | avifResult jxl_return_if_avif_error_result = (result); \
| ^~~~~~
/home/bfriesen/src/libjxl/tools/benchmark/benchmark_codec_avif.cc: In member function ‘jxl::Status jpegxl::tools::AvifCodec::Compress(const string&, const jxl::CodecInOut*, jxl::ThreadPool*, std::vector<unsigned char>*, jpegxl::tools::SpeedStats*)’:
/home/bfriesen/src/libjxl/tools/benchmark/benchmark_codec_avif.cc:313:60: error: void value not ignored as it ought to be
313 | JXL_RETURN_IF_AVIF_ERROR(avifRGBImageAllocatePixels(&rgb_image));
| ^
/home/bfriesen/src/libjxl/tools/benchmark/benchmark_codec_avif.cc:23:51: note: in definition of macro ‘JXL_RETURN_IF_AVIF_ERROR’
23 | avifResult jxl_return_if_avif_error_result = (result); \
| ^~~~~~
/home/bfriesen/src/libjxl/tools/benchmark/benchmark_codec_avif.cc: In member function ‘jxl::Status jpegxl::tools::AvifCodec::Decompress(const string&, jxl::Span<const unsigned char>, jxl::ThreadPool*, jxl::CodecInOut*, jpegxl::tools::SpeedStats*)’:
/home/bfriesen/src/libjxl/tools/benchmark/benchmark_codec_avif.cc:382:60: error: void value not ignored as it ought to be
382 | JXL_RETURN_IF_AVIF_ERROR(avifRGBImageAllocatePixels(&rgb_image));
| ^
/home/bfriesen/src/libjxl/tools/benchmark/benchmark_codec_avif.cc:23:51: note: in definition of macro ‘JXL_RETURN_IF_AVIF_ERROR’
23 | avifResult jxl_return_if_avif_error_result = (result); \
| ^~~~~~
```
**Environment**
- OS: Ubuntu 22.04 LTS
- Compiler version: GCC 11.4.0
- CPU type: x86_64
- cjxl/djxl version string: Unknown
**Additional context**
Installed Libavif version is 0.9.3-3
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| Failure to build tools/benchmark/benchmark_codec_avif.cc under Ubuntu 22.04 LTS | https://api.github.com/repos/libjxl/libjxl/issues/3753/comments | 6 | 2024-08-15T13:32:51Z | 2024-09-09T11:49:10Z | https://github.com/libjxl/libjxl/issues/3753 | 2,468,064,302 | 3,753 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
OS may run out of RAM and freeze when processing extremely high resolution images with `cjxl`.
**Describe the solution you'd like**
Extend streaming encoding in `cjxl`.
Streaming encoding implementation in `cjxl` is limited to certain options. I'm proposing extending it.
Options marked with "x" do not feature streaming encoding.
|Options|Max RAM Usage|High RAM Usage|
|-|-|:-:|
|`-e 7`|366 MB||
|`-e 8`|7991 MB|x|
|`-e 9`|8175 MB|x|
|`-e 10`|8173 MB|x|
|`-m 1`|5086 MB|x|
|`-e 9 -q 100`|355 MB||
|`-e 10 -q 100`|5086 MB|x|
Env: cjxl from libjxl 0.10.3; Linux; 7680 x 4320 PNG; measured with `/usr/bin/time -f "%M"`
Is adding streaming encoding viable in this case? | Extend streaming encoding in cjxl | https://api.github.com/repos/libjxl/libjxl/issues/3746/comments | 6 | 2024-08-12T04:33:18Z | 2025-01-08T23:29:47Z | https://github.com/libjxl/libjxl/issues/3746 | 2,460,018,222 | 3,746 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
trying to run this command to convert an APNG file to an animated JPEG XL doesn't work:
```bash
cjxl '/home/redacted/Downloads/alexey-fedorov.png' '/home/redacted/Downloads/alexey-fedorov-apng-input.jxl'
```
This is what it returns:
```bash
JPEG XL encoder v0.10.3 [AVX2,SSE4,SSE2]
Getting pixel data failed.
```
**To Reproduce**
I've tried with two files, both from different places. Basically, take any APNG and try to convert it to JPEG XL.
This is one of the APNG I tried to convert:

**Expected behavior**
Creates an animated JPEG XL file.
**Additional context**
I'm using the pre-packaged binaries directly from the openSUSE Tumbleweed repositories.
I have also tried building from source with the debug symbols turned on.
This is the output, the above command gave me, after building from source.
```bash
JPEG XL encoder v0.11.0 e10fb685 [AVX2,SSE4,SSE2]
./lib/extras/dec/apng.cc:899: JXL_FAILURE: Malformed chunk
./lib/extras/dec/exr.cc:29: JXL_FAILURE: EXR is not supported
./lib/extras/dec/decode.cc:151: JXL_FAILURE: Codecs failed to decode
Getting pixel data failed.
```
From what I understand, my input APNG is being flagged as malformed. However, I have **multiple programs that can read the APNG correctly.**
**Environment**
- OS: openSUSE Tumbleweed
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.10.3 [AVX2,SSE4,SSE2]
**Edit**
I also tried changing the extension to `.apng`, that did nothing.
| BUG - Can't create a JPEG XL file from animated PNGs | https://api.github.com/repos/libjxl/libjxl/issues/3745/comments | 24 | 2024-08-10T18:50:51Z | 2024-08-15T04:48:19Z | https://github.com/libjxl/libjxl/issues/3745 | 2,459,253,851 | 3,745 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
To show all `--help` infos you're required to specify the verbose flag multiple times. But breaking Unix conventions it's not possible to just use a single minus here, and instead it's required to use multiple individual flags - which principle of least astonishment (POLA):
```
$ cjxl --help -vvvv
Unknown argument: -vvvv
Use 'cjxl -h' for more information
$ cjxl --help -v -v -v -v
JPEG XL encoder v0.10.3 4a3b22d2 [AVX2,SSE4,SSE2]
Usage: cjxl INPUT OUTPUT [OPTIONS...]
INPUT
the input can be PNG, APNG, GIF, JPEG, EXR, PPM, PFM, PAM, PGX, or JXL
OUTPUT
the compressed JXL output file
Basic options:
-d DISTANCE, --distance=DISTANCE
[...]
```
**To Reproduce**
Steps to reproduce the behavior:
- Call cjxl with `--help`and `-vvvv`
**Expected behavior**
It's expected, that `-vvvv`and `-v -v -v -v` do the same thing.
**Environment**
- OS: Linux
- Compiler version:
- CPU type: x86_64
- cjxl/djxl version string: JPEG XL encoder v0.10.3 4a3b22d2 [AVX2,SSE4,SSE2]
| Specifying the verbose multiple times with a short flag does require individual minuses | https://api.github.com/repos/libjxl/libjxl/issues/3742/comments | 3 | 2024-08-08T18:44:46Z | 2024-09-05T07:05:34Z | https://github.com/libjxl/libjxl/issues/3742 | 2,456,418,467 | 3,742 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
libjpeg and libjpeg derivatives use quite a lot of ram to decode progressive jpegs because of the additional virtual block array to store the resulting coefficients from each scan.
I am implementing streaming scanline decode -> downsample -> encode for multiple formats. The current target format is PNG (soon JXL), and the current downsample scale is 1/8th or 1/16th. Each pipeline runs on a single thread in a thread pool. However this severely inflates memory usage when multiple progressive jpegs are encountered, about 50-60mb for each. On a 24-core system this results in 1GB instantaneous memory usage, worst case.
**Describe the solution you'd like**
It _should_ be possible to reduce memory usage for scanline-by-scanline decoding for a progressive jpeg that is fully resident in memory by reading all scans in lockstep.
**Describe alternatives you've considered**
I am currently experimenting with lockstep with mozjpeg by abusing the memory manager to share the virtual block array with multiple decoders.
| "Windowed"/"Lockstep" progressive JPEG decoding in jpegli | https://api.github.com/repos/libjxl/libjxl/issues/3741/comments | 1 | 2024-08-08T18:17:50Z | 2024-09-10T18:25:38Z | https://github.com/libjxl/libjxl/issues/3741 | 2,456,374,200 | 3,741 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
I need to convert a massive amount of pictures that are tagged using extended attributes on the file system. Right now, `cjxl` copies over the EXIF data, which is great. I would also love to be able to copy over the extended attributes via a single command.
**Describe the solution you'd like**
We could have `--xattrs` just like `rsync` and `tar`, which both have this attribute to conserve the extended attributes.
**Describe alternatives you've considered**
I have considered writing a bash script that converts, then copies over the extended attributes. However, I think it would be a better user experience to have it “just work” in a single command.
**Additional context**
I'm mainly interested in the `user.xdg.tags` value, if that changes anything.
| Feature request - CJXL - Add argument to copy over extended attributes on compatible file systems | https://api.github.com/repos/libjxl/libjxl/issues/3738/comments | 1 | 2024-08-07T21:38:33Z | 2024-09-05T07:04:37Z | https://github.com/libjxl/libjxl/issues/3738 | 2,454,401,861 | 3,738 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When building `libjxl` with CMake as a static library, the macros `JXL_CMS_EXPORT` and `JXL_THREADS_EXPORT` are defined to be empty
**To Reproduce**
```
mkdir build && cd build
cmake .. -DBUILD_SHARED_LIBS=OFF
cat ./lib/include/jxl/jxl_cms_export.h
```
**Expected behavior**
Visibility is set to `default`
**Environment**
- OS: Linux and probably macOS
- Compiler version: g++ 11
- CPU type: x86_64
**Additional context**
The problem is usually visible only when building a shared module (Node.js addon in my case) that includes a `libjxl` as a static library.
| When building `libjxl` with CMake as a static library, the visibility of certain exports is not set | https://api.github.com/repos/libjxl/libjxl/issues/3737/comments | 4 | 2024-08-07T11:16:49Z | 2024-09-23T19:51:53Z | https://github.com/libjxl/libjxl/issues/3737 | 2,453,228,216 | 3,737 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When the image path contains special characters like emojis, reading the image file fails.
ex)
```
cjxl '໒꒰՞ ܸ. .ܸ՞꒱ა\test.jpg' test.jxl
JPEG XL encoder v0.10.3 4a3b22d [AVX2,SSE2]
Reading image data failed.
```
```
cjxl '🏖️\test.jpg' test.jxl
JPEG XL encoder v0.10.3 4a3b22d [AVX2,SSE2]
Reading image data failed.
```
**Environment**
- OS: Windows
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.10.3
| When the image path contains special characters like emojis, reading the image file fails | https://api.github.com/repos/libjxl/libjxl/issues/3731/comments | 2 | 2024-08-05T14:54:25Z | 2024-08-07T11:49:18Z | https://github.com/libjxl/libjxl/issues/3731 | 2,448,762,500 | 3,731 |
[
"libjxl",
"libjxl"
] | It's in white when `-Parallel` and `-ThrottleLimit $workers` are removed. Powershell version is this https://github.com/PowerShell/PowerShell/releases/tag/v7.4.4. There doesn't look to be anything wrong with the JXL files.
`testbatch -directory "E:\test" -workers 2`
```
function testbatch {
param(
[string]$directory,
[int]$workers
)
if (-not (Get-ChildItem -LiteralPath $directory -Recurse -File -Include *.jpg, *.jpeg, *.png)) {
return
}
$files = Get-ChildItem -LiteralPath $directory -Include *.png, *.jpg, *.jpeg -Recurse
$files | ForEach-Object -Parallel {
$jxlfile = $_.FullName + ".jxl"
& cjxl -j 0 -q 90 -e 1 --num_threads=0 $_.FullName $jxlfile
} -ThrottleLimit $workers
}
```

| Why is cjxl.exe's text always in red when using a Powershell script with -Parallel? | https://api.github.com/repos/libjxl/libjxl/issues/3730/comments | 0 | 2024-08-04T21:30:46Z | 2024-08-05T09:25:13Z | https://github.com/libjxl/libjxl/issues/3730 | 2,447,303,714 | 3,730 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
`cjxl -d 0 -e 1` and `cjxl -d 0 -e 2` produce bit-exact JXL file of effort 2.
**To Reproduce**
Take any PNG image, and do:
```
cjxl -d 0 -e 1 input.png e1.jxl
cjxl -d 0 -e 2 input.png e2.jxl
b2sum e1.jxl e2.jxl
```
For my test image, I get this:
```console
$ cjxl -d 0 -e 1 input.png e1.jxl
JPEG XL encoder v0.10.2 f7f20ce0 [NEON]
Encoding [Modular, lossless, effort: 1]
Compressed to 25964.5 kB (8.769 bpp).
5787 x 4093, 100.085 MP/s [100.08, 100.08], , 1 reps, 8 threads.
$ cjxl -d 0 -e 2 input.png e2.jxl
JPEG XL encoder v0.10.2 f7f20ce0 [NEON]
Encoding [Modular, lossless, effort: 2]
Compressed to 25964.5 kB (8.769 bpp).
5787 x 4093, 100.695 MP/s [100.70, 100.70], , 1 reps, 8 threads.
$ b2sum e1.jxl e2.jxl
b67e62ce310408d6e08a29d128a602ad656b1064025f12e5940057d12a27b205520095246e27c7abeb5a993b63e6e2a6d71709ec161f6ebe425f0c6b01bf919d e1.jxl
b67e62ce310408d6e08a29d128a602ad656b1064025f12e5940057d12a27b205520095246e27c7abeb5a993b63e6e2a6d71709ec161f6ebe425f0c6b01bf919d e2.jxl
```
Both images are encoded with fixed Gradient MA tree and ANS.
**Expected behavior**
- `-e 1` should be faster to encode.
- Hashes should be different.
**Environment**
```console
$ clang --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ cjxl --version
cjxl v0.10.2 f7f20ce0 [NEON]
Copyright (c) the JPEG XL Project
```
f7f20ce0 is the current HEAD.
**Additional context**
It worked on libjxl v0.10.2 and v0.10.3. | Lossless effort 1 and 2 produce exact same bitstream (fast-lossless not working) | https://api.github.com/repos/libjxl/libjxl/issues/3729/comments | 2 | 2024-08-04T07:32:15Z | 2024-08-07T16:14:57Z | https://github.com/libjxl/libjxl/issues/3729 | 2,446,899,048 | 3,729 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
A use-after-scope error occurs in the FixedAspectRatios function within the libjxl library. This issue arises when attempting to access the global variable kRatios in the FixedAspectRatios function, leading to a crash.
**To Reproduce**
compile with ASan undefined and addresses.
then run.
```bash
$ ./jxlinfo /path/to/file.jxl
```
**Expected behavior**
Not to crash and run without the error.
**Screenshots**
crash log:
```bash
=================================================================
==321632==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f2f6c611270 at pc 0x7f2f6bc91594 bp 0x7ffe033ecbf0 sp 0x7ffe033ecbe0
READ of size 4 at 0x7f2f6c611270 thread T0
#0 0x7f2f6bc91593 in FixedAspectRatios /home/ /libjxl/lib/jxl/headers.cc:37
#1 0x7f2f6bc91593 in jxl::SizeHeader::xsize() const /home/ /libjxl/lib/jxl/headers.cc:53
#2 0x7f2f6bb7693f in JxlDecoderGetBasicInfo /home/ /libjxl/lib/jxl/decode.cc:2074
#3 0x55ba940157fc in jxl::extras::DecodeImageJXL(unsigned char const*, unsigned long, jxl::extras::JXLDecompressParams const&, unsigned long*, jxl::extras::PackedPixelFile*, std::vector<unsigned char, std::allocator<unsigned char> >*) /home/ /libjxl/lib/extras/dec/jxl.cc:316
#4 0x55ba93dea302 in DecompressJxlToPackedPixelFile /home/ /libjxl/tools/djxl_main.cc:394
#5 0x55ba93dea302 in main /home/ /libjxl/tools/djxl_main.cc:562
#6 0x7f2f65528d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#7 0x7f2f65528e3f in __libc_start_main_impl ../csu/libc-start.c:392
#8 0x55ba93e01e04 in _start (/home/ /libjxl/build/tools/djxl+0x359e04)
0x7f2f6c611270 is located 16 bytes inside of global variable 'kRatios' defined in '/home/ /libjxl/lib/jxl/headers.cc:30:22' (0x7f2f6c611260) of size 56
SUMMARY: AddressSanitizer: stack-use-after-scope /home/ /libjxl/lib/jxl/headers.cc:37 in FixedAspectRatios
Shadow bytes around the buggy address:
0x0fe66d8ba1f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe66d8ba200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe66d8ba210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe66d8ba220: 06 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 05 f9 f9
0x0fe66d8ba230: f9 f9 f9 f9 00 00 00 00 04 f9 f9 f9 f9 f9 f9 f9
=>0x0fe66d8ba240: 00 00 00 00 05 f9 f9 f9 f9 f9 f9 f9 f8 f8[f8]f8
0x0fe66d8ba250: f8 f8 f8 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
0x0fe66d8ba260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe66d8ba270: 00 00 01 f9 f9 f9 f9 f9 00 00 00 00 00 04 f9 f9
0x0fe66d8ba280: f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
0x0fe66d8ba290: 00 00 00 00 00 05 f9 f9 f9 f9 f9 f9 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==321632==ABORTING
```
**Environment**
OS: Ubuntu 20.04
Compiler Version: clang 11.0.1
CPU Type: x86_64
cjxl/djxl Version String: v0.10.2 (7b9701eb) [AVX2, SSE4, SSE2]
**Additional context**
Add any other context about the problem here.
[JXL_crashes.zip](https://github.com/user-attachments/files/16413410/JXL_crashes.zip)
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| stack-use-after-scope in FixedAspectRatios | https://api.github.com/repos/libjxl/libjxl/issues/3724/comments | 2 | 2024-07-29T12:56:31Z | 2024-08-20T01:54:19Z | https://github.com/libjxl/libjxl/issues/3724 | 2,435,348,287 | 3,724 |
[
"libjxl",
"libjxl"
] | So how do I compile it? | The skcms repository on GitHub has been removed | https://api.github.com/repos/libjxl/libjxl/issues/3722/comments | 0 | 2024-07-26T07:00:07Z | 2024-07-26T07:28:43Z | https://github.com/libjxl/libjxl/issues/3722 | 2,431,565,009 | 3,722 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Losslessly compressing some PNGs does not beat WEBP. Lossy compression with med-high quality gets even worse than PNG.
I don't think it's really a bug, but maybe something can be improved?
**To Reproduce**
Just compressing all files in a directory with `cjxl -d 0 -e 9 $i $(basename $i png)jxl` results in:
```
30M jxl
34M png
26M webp
```
(the WEBP files are lossless compressions too)
`cjxl -d 1 $i $(basename $i png)jxl` gives:
```
67M jxl
34M png
26M webp
```
and only `cjxl -q 20 $i $(basename $i png)jxl` gets down to:
```
25M jxl
34M png
26M webp
```
**Expected behavior**
I hoped all would be smaller than WEBP :)
**Screenshots**
Of course, it all depends on what the files look like. They're all grayscale comic strips like this:

**Environment**
- OS: Kubuntu 22.04
- Compiler version: (installed from the .deb packages here)
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.10.3 0.10.3 [AVX2,SSE4,SSE2] | Not better than WEBP, sometimes worse than PNG | https://api.github.com/repos/libjxl/libjxl/issues/3720/comments | 23 | 2024-07-23T17:45:20Z | 2025-06-20T10:38:14Z | https://github.com/libjxl/libjxl/issues/3720 | 2,425,763,013 | 3,720 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
For 16bit grayscale PGM(with 65535 in header), everything works fine, the `idenfity` result is identical for src and target.
But for 14bit grayscale PGM(with 16383 in header), this issue happens.
**To Reproduce**
I have a 14-bit grayscale PGM `src.pgm`, and I converted it to lossless JXL by using `cjxl -d 0 src.pgm target.jxl`.
The problem is the brightness of these two are slightly different.
By using `identify -verbose`, I get the Channel statistics:
**src.pgm**
```
Channel statistics:
Pixels: 24337152
Gray:
min: 0 (0)
max: 15871 (0.968748)
mean: 642.471 (0.0392157)
median: 229 (0.0139779)
standard deviation: 1242.43 (0.0758363)
kurtosis: 15.1143
skewness: 3.73396
entropy: 0.759787
```
**target.jxl**
```
Channel statistics:
Pixels: 24337152
Gray:
min: 0 (0)
max: 15871 (0.96875)
mean: 642.457 (0.0392148)
median: 228.99 (0.0139773)
standard deviation: 1242.42 (0.0758362)
kurtosis: 15.1143
skewness: 3.73397
entropy: 0.759787
```
One more thing, I also decode the compressed jxl file to `decoded.pgm`.
The pixel values in `decoded.pgm` are **not identical** to `src.pgm`.
**Expected behavior**
It should like the 16bit grayscale image, the two statistics from `identify` should be identical.
**Environment**
- OS: MacOS
- Compiler version: Apple clang version 15.0.0
- CPU type: M2
- cjxl/djxl version string: Both v0.10.2 and main
| 14bit grayscale image cannot be correctly compressed in lossless mode | https://api.github.com/repos/libjxl/libjxl/issues/3718/comments | 1 | 2024-07-23T13:58:08Z | 2024-11-02T23:28:05Z | https://github.com/libjxl/libjxl/issues/3718 | 2,425,293,371 | 3,718 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When using `cjxl` to encode a particular 2096x2088 PNG image to lossless JPEG XL, a reddish 48x40 rectangle appears at the bottom-right corner of the encoded JXL.
**To Reproduce**
Encode this image using `cjxl -d 0 -e 5`
<img width="512" src="https://github.com/user-attachments/assets/4dcfec20-9f3b-448a-9f75-af03db2086e1"></img>
**Expected behavior**
The encoded JXL should contain all pixels of the PNG unaltered.
**Screenshots**
This is a 512x512 crop of the bottom-right corner of the encoded JXL

**Environment**
- OS: Windows 10
- Compiler version: Unknown (downloaded from GitHub releases)
- CPU type: x86_64
- cjxl/djxl version string: `JPEG XL encoder v0.10.2 e148959 [AVX2,SSE2]`
**Additional context**
The image I had this issue on was the [cover art for femtanyl's "CHASER" EP](https://musicbrainz.org/release/ada3880b-7522-47cc-b526-81d2aadb5a4a/cover-art) at original size, which is **slightly graphic.**
This would be rather distracting, so the provided test image is that cover art with the graphic part blacked out.
It exhibits the same problem as the source image.
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| 2k²~ image encoded in lossless mode has color artifact above effort 4 | https://api.github.com/repos/libjxl/libjxl/issues/3717/comments | 5 | 2024-07-23T10:21:58Z | 2024-07-29T20:57:49Z | https://github.com/libjxl/libjxl/issues/3717 | 2,424,825,870 | 3,717 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
It seems the following is not true anymore:
```
jxl_from_tree /usr/share/libjxl-testdata/jxl/splines.tree tmp.jxl
cmp /usr/share/libjxl-testdata/jxl/splines.jxl tmp.jxl
```
Could someone please confirm that this is correct behavior as I could not see the changes documented in the 0.10.x notes.
**To Reproduce**
```
jxl_from_tree /usr/share/libjxl-testdata/jxl/splines.tree tmp.jxl
cmp /usr/share/libjxl-testdata/jxl/splines.jxl tmp.jxl
=> 1
```
**Expected behavior**
```
jxl_from_tree /usr/share/libjxl-testdata/jxl/splines.tree tmp.jxl
cmp /usr/share/libjxl-testdata/jxl/splines.jxl tmp.jxl
=> 0
```
**Screenshots**
Data is taken from libjxl-test-data
**Environment**
- OS: Linux/amd64
- Compiler version: gcc-13
- CPU type: x86_64
- cjxl/djxl version string: 0.10.3
- jxl-test-data: ff8d743aaba05b3014f17e5475e576242fa979fc | libjxl-testdata/jxl/splines.tree is no longer libjxl-testdata/jxl/splines.jxl | https://api.github.com/repos/libjxl/libjxl/issues/3714/comments | 3 | 2024-07-22T10:58:38Z | 2024-07-23T09:24:11Z | https://github.com/libjxl/libjxl/issues/3714 | 2,422,578,176 | 3,714 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
In lossless mode, effort 7 is worse than e3-e6 for grayscale photos.
The attachment is a 16bit grayscale pgm image, the size of it is **48,674,323** bytes.
I did lossless compression on it with different efforts:
```
e1: 19,428,536
e2: 18,057,384
e3: 17,304,707
e4: 17,415,714
e5: 17,376,867
e6: 17,296,737
e7: 17,422,704 // e7 is larger than e6, e5, e4, e3
e8: 17,482,889 //even worse than e7
```
e3 and e6 produces the smallest files.
**To Reproduce**
`cjxl -d 0 -e [1-8] dump.pgm dump.jxl`
**Expected behavior**
Greater effort should produce smaller file.
**Environment**
- OS: MacOS
- CPU type: Arm64
- cjxl/djxl version string: cjxl v0.10.2 0.10.2 [NEON]
[dump.pgm.7z.zip](https://github.com/user-attachments/files/16249048/dump.pgm.7z.zip)
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| effort 7 produces larger files than effort 3 to 6 for grayscale photos in lossless | https://api.github.com/repos/libjxl/libjxl/issues/3713/comments | 1 | 2024-07-16T12:56:03Z | 2024-08-05T09:20:46Z | https://github.com/libjxl/libjxl/issues/3713 | 2,411,072,722 | 3,713 |
[
"libjxl",
"libjxl"
] | Currently, if corruption is detected (typically by ANS end state not matching), the decoder refuses to decode the image.
It would be useful to have an option in the decoder to ignore corrupted sections and still return an image in this case. It makes sense to disable this option by default and preserve the current behavior, but it would be a useful option to have in order to get a basic form of error resilience / data recovery.
If the corruption only happens in AC groups, ignoring the corrupted groups (i.e. assuming all coefficients are zero) would allow still recovering a reasonable image (something similar to a progressive preview).
It might be a good idea to add this option to the API before v1.0.
Possibly this could be not just a boolean setting, but an integer with different levels of 'stubbornness': default 0 would be to give up on any error, value 1 could be "allow 1 corrupt AC group but not more", value 2 could be "allow any number of corrupt AC groups", value 3 could be "also allow corrupt DC groups" (e.g. setting the corrupt DC values to gray so you can still see any available high-frequency data in the group).
Setting this option to a nonzero value does not guarantee that you will get an image in all cases: for corruptions in the headers etc, the decoder will still refuse to decode the image. | Decode option for decoding corrupted bitstreams | https://api.github.com/repos/libjxl/libjxl/issues/3712/comments | 3 | 2024-07-16T04:58:47Z | 2024-09-16T08:25:26Z | https://github.com/libjxl/libjxl/issues/3712 | 2,410,214,839 | 3,712 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Hello,
I'm experiencing the same issue described in https://github.com/libjxl/libjxl/issues/3378. According to https://github.com/libjxl/libjxl/pull/3394, the issue was fixed. I see that the main branch includes this fix, but the release tags do not. I would like to understand the release management process of libjxl better.
Looking at the latest release tags, I see that on June 27, four releases were created: [v0.7.1](https://github.com/libjxl/libjxl/releases/tag/v0.7.1), [v0.8.3](https://github.com/libjxl/libjxl/releases/tag/v0.8.3), [v0.9.3](https://github.com/libjxl/libjxl/releases/tag/v0.9.3), and [v0.10.3](https://github.com/libjxl/libjxl/releases/tag/v0.10.3) (the latest).
Why do these releases not include the fix committed on March 7th? Additionally, what are the main differences between the 0.7.x, 0.8.x, 0.9.x, and 0.10.x versions?
Thank you in advance.
**To Reproduce**
Steps to reproduce the behavior:
The error does not exist if build is made from main branch. The "SOS marker" error is present when build is made from 0.7.x, 0.8.x, 0.9.x, and 0.10.x source code.
Checkout main branch and compare with release branches and see that the following method is different:
- **main**
https://github.com/libjxl/libjxl/blob/main/lib/jpegli/decode.cc#L767
- **v0.10.3**
https://github.com/libjxl/libjxl/blob/v0.10.3/lib/jpegli/decode.cc#L742
**Expected behavior**
Have developments/fixes of main branch in releases.
| Releases are not reflecting main developments | https://api.github.com/repos/libjxl/libjxl/issues/3700/comments | 6 | 2024-07-05T08:43:10Z | 2025-04-27T02:18:28Z | https://github.com/libjxl/libjxl/issues/3700 | 2,392,146,786 | 3,700 |
[
"libjxl",
"libjxl"
] | ···cpp
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
namespace win{
#include <Windows.h>
}
#include <jxl/codestream_header.h>
#include <jxl/color_encoding.h>
#include <jxl/encode.h>
#include <jxl/encode_cxx.h>
#include <jxl/thread_parallel_runner.h>
#include <jxl/thread_parallel_runner_cxx.h>
#include <jxl/types.h>
bool ReadBitmap(const char* file_name, uint8_t** image_data, win::BITMAPFILEHEADER* bfHeader, win::BITMAPINFOHEADER* biHeader);
bool WriteFile(const char* file_name, uint8_t* file_data);
int main()
{
uint8_t* pixels, * compressed;
win::BITMAPFILEHEADER bfHeader;
win::BITMAPINFOHEADER biHeader;
ReadBitmap("C:\\Users\\Error\\source\\repos\\JXLTest\\JXLTest\\testfile\\test.bmp", &pixels, &bfHeader, &biHeader);
//reverseMemory(pixels);
auto enc = JxlEncoderMake(/*memory_manager=*/nullptr);
auto runner = JxlThreadParallelRunnerMake(
/*memory_manager=*/nullptr,
JxlThreadParallelRunnerDefaultNumWorkerThreads());
if (JXL_ENC_SUCCESS != JxlEncoderSetParallelRunner(enc.get(),
JxlThreadParallelRunner,
runner.get())) {
fprintf(stderr, "JxlEncoderSetParallelRunner failed\n");
return 0;
}
JxlPixelFormat pixel_format = { 3, JXL_TYPE_UINT8, JXL_NATIVE_ENDIAN, 0 };
JxlBasicInfo basic_info;
JxlEncoderInitBasicInfo(&basic_info);
basic_info.xsize = biHeader.biWidth;
basic_info.ysize = biHeader.biHeight;
//basic_info.bits_per_sample = 24;
//basic_info.exponent_bits_per_sample = 8;
basic_info.uses_original_profile = JXL_FALSE;
if (JXL_ENC_SUCCESS != JxlEncoderSetBasicInfo(enc.get(), &basic_info)) {
fprintf(stderr, "JxlEncoderSetBasicInfo failed\n");
return 0;
}
JxlColorEncoding color_encoding = {};
JXL_BOOL is_gray = TO_JXL_BOOL(pixel_format.num_channels < 3);
JxlColorEncodingSetToSRGB(&color_encoding, is_gray);
if (JXL_ENC_SUCCESS !=
JxlEncoderSetColorEncoding(enc.get(), &color_encoding)) {
fprintf(stderr, "JxlEncoderSetColorEncoding failed\n");
return 0;
}
JxlEncoderFrameSettings* frame_settings =
JxlEncoderFrameSettingsCreate(enc.get(), nullptr);
if (JXL_ENC_SUCCESS !=
JxlEncoderAddImageFrame(frame_settings, &pixel_format,
pixels,
biHeader.biSizeImage)) {
fprintf(stderr, "JxlEncoderAddImageFrame failed\n");
return 0;
}
JxlEncoderCloseInput(enc.get());
compressed = (uint8_t*)malloc(64);
if (compressed == nullptr) {
fprintf_s(stderr, "%s\n", "Memory allocation failed!");
return 0;
}
uint8_t* next_out = compressed;
size_t avail_out = _msize(compressed) - (next_out - compressed);
JxlEncoderStatus process_result = JXL_ENC_NEED_MORE_OUTPUT;
while (process_result == JXL_ENC_NEED_MORE_OUTPUT) {
process_result = JxlEncoderProcessOutput(enc.get(), &next_out, &avail_out);
if (process_result == JXL_ENC_NEED_MORE_OUTPUT) {
size_t offset = next_out - compressed;
compressed = (uint8_t*)realloc(compressed,_msize(compressed) * 2);
next_out = compressed + offset;
avail_out = _msize(compressed) - offset;
}
}
compressed = (uint8_t*)realloc(compressed,next_out - compressed);
if (compressed == nullptr) {
fprintf_s(stderr, "%s\n", "Memory allocation failed!");
return 0;
}
if (JXL_ENC_SUCCESS != process_result) {
fprintf(stderr, "JxlEncoderProcessOutput failed\n");
return 0;
}
WriteFile("C:\\Users\\Error\\source\\repos\\JXLTest\\JXLTest\\testfile\\test.jxl", compressed);
free(pixels);
free(compressed);
return 1;
}
bool ReadBitmap(const char* file_name, uint8_t** image_data, win::BITMAPFILEHEADER* bfHeader, win::BITMAPINFOHEADER* biHeader)
{
FILE* fp;
if (fopen_s(&fp, file_name, "rb"))
{
fprintf_s(stderr, "%s\n", "open file failed!");
return false;
}
fread_s(bfHeader, sizeof(win::BITMAPFILEHEADER), sizeof(win::BITMAPFILEHEADER), 1, fp);
fread_s(biHeader, sizeof(win::BITMAPINFOHEADER), sizeof(win::BITMAPINFOHEADER), 1, fp);
*image_data = (uint8_t*)malloc(biHeader->biSizeImage);
if (*image_data == nullptr) {
fprintf_s(stderr, "%s\n", "memory allocation failed!");
return false;
}
fread_s(*image_data, _msize(*image_data), sizeof(uint8_t), biHeader->biSizeImage / sizeof(uint8_t), fp);
fclose(fp);
return true;
}
bool WriteFile(const char* file_name, uint8_t* file_data)
{
FILE* fp;
if (fopen_s(&fp, file_name, "wb"))
{
fprintf_s(stderr, "%s\n", "open file failed!");
return false;
}
fwrite(file_data, sizeof(uint8_t), _msize(file_data) / sizeof(uint8_t), fp);
fclose(fp);
return true;
}
···
###the test bmp(github issue can't use bmp so I use the jpg that I Download it from the Internet at the beginning):

###the encoded image(github issue can't use jxl,so I turn the jxl into jpg):

###As you can see, it seems to become a complementary color and upside down
###I use GIMP to watch it:

###What is certain is that the API must be fine, it must be the wrong way for me to use it | I use API to encode a bmp file,but the color looks wrong | https://api.github.com/repos/libjxl/libjxl/issues/3699/comments | 2 | 2024-07-05T08:24:53Z | 2025-04-27T02:15:54Z | https://github.com/libjxl/libjxl/issues/3699 | 2,392,117,164 | 3,699 |
[
"libjxl",
"libjxl"
] | IDE:Visual Studio 2022
When I link its static link library (jxl.lib), it gives the error:
The severity code describes the project file line suppresses the status details
Error LNK2001 External symbol that could not be resolved __imp_JxlEncoderVersion Project2 C:UsersErrorsourcereposProject2Project2main.obj 1
But when I link its dynamic link library(jxl.lib->jxl.dll), it compiles and works | I wanted to link this library but get a mistake | https://api.github.com/repos/libjxl/libjxl/issues/3696/comments | 0 | 2024-07-04T11:02:44Z | 2024-08-05T09:18:10Z | https://github.com/libjxl/libjxl/issues/3696 | 2,390,588,080 | 3,696 |
[
"libjxl",
"libjxl"
] | tracking_memory_manager.cc(41,35): error C2672: 'std::max': no matching overloaded function
Windows10X64+VS2022 | tracking_memory_manager.cc(41,35): error C2672: 'std::max': no matching overloaded function | https://api.github.com/repos/libjxl/libjxl/issues/3694/comments | 2 | 2024-07-04T08:10:11Z | 2024-07-04T10:47:04Z | https://github.com/libjxl/libjxl/issues/3694 | 2,390,231,298 | 3,694 |
[
"libjxl",
"libjxl"
] | testing on medical image sequence (extracted from a lossy video), that are mostly monochrome.
using release v0.10.2, `-d 0`, unless otherwise stated.
----
the dataset is encoded by OpenCV MJPG. 20240105110813294_buf.avi
lossless compression, turns out that `-e 1` compresses better than `-e 2/3/4`. `2/3/4` gets ~2.4bpp while `1` gets ~1.9bpp. `5` gets ~1.6bpp as expected. however their relative speeds looks legit, `-e 1` runs blazing fast. i guess there must be some problem with `-e 2/3/4`.
non-exhaustive version switching test shows v0.8.0 works as expected (`2/3/4` has reasonable bpp between `1` and `5`, while `1` and `5` results are close to v0.10.2) while 0.9.2 and later sucks on `2/3/4`. didn't have time to bisect finer between versions or even commits.
----
this dataset is originally encoded as msvideo1 (144M), and extracting every frame as png (by ffmpeg) results in 47.7M. so i uploaded them as zip of pngs. frames_some_msvideo1.zip
it has a stranger curve:
`png`:47.7M `-e 1`:41.8M `2`:32.4M `3`:50.0M `4`:34.0M `5`:22.5M `7`:19.0M `10`:18.1M
edit: what's even more weirder, when set to lossy `-d 1`, then `-e 1` results in 29.2M, `5` results in 37.9M, `7` results in 38.0M.... it seems lossless compression beats lossy compression by a lot on this... is it because of how msvideo1 compresses the figures? (i searched and see it uses rgb555 and has limited number of colors in 4x4)
----
dataset download: https://mega.nz/folder/GuIwiZAb#-3tnhi0_9BIn_vztTGoKhQ
```bash
framespath=../path/to/frames/folder
for i in $(seq 1 558);
do
./v0102/cjxl $framespath/f$i.png $framespath/j$i.jxl -d 1 -e 1
done
``` | lossless compression rate doesn't scale smoothly to effort | https://api.github.com/repos/libjxl/libjxl/issues/3691/comments | 1 | 2024-07-03T03:37:40Z | 2024-08-05T09:17:33Z | https://github.com/libjxl/libjxl/issues/3691 | 2,387,590,970 | 3,691 |
[
"libjxl",
"libjxl"
] | There is no output file being generated and there is no error message.
```
cjxl -v input.jpg output.jxl
JPEG XL encoder v0.10.2 af3ef0e [AVX2,SSE2]
Read JPEG image with 923796 bytes.
Encoding [JPEG, lossless transcode, effort: 7]
``` | Missing output file | https://api.github.com/repos/libjxl/libjxl/issues/3690/comments | 6 | 2024-07-02T23:42:02Z | 2025-04-17T03:19:56Z | https://github.com/libjxl/libjxl/issues/3690 | 2,387,346,227 | 3,690 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When running `deps.sh` in a path with spaces, the dependencies are downloaded to the wrong path: e.g.
```bash
❯ pwd
/Users/hello/code/test/te st/blah/libjxl-0.10.3/build
❯ ./deps.sh
fatal: not a git repository (or any of the parent directories): .git
Downloading testdata version 873045a9c42ed60721756e26e2a6b32e17415205...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
[...]
❯ ls third_party/skcms
❯ ls third_party/highway
❯ ls ../../../../test$'\n'st/blah/libjxl-0.10.3/
downloads testdata third_party
```
The files are instead in a directory that contains a `\n` character
**To Reproduce**
Create a path containing a space, extract libjxl source code in a directory under it and runs `./deps.sh`
**Expected behavior**
Dependencies will be downloaded under `third_party`
**Screenshots**
**Environment**
- OS: MacOS 14.5
- Compiler version: Apple clang version 15.0.0
- CPU type: Apple Sillicon M2
- cjxl/djxl version string: 0.10.3
**Additional context**
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| deps.sh fails when running in a path with spaces | https://api.github.com/repos/libjxl/libjxl/issues/3684/comments | 2 | 2024-07-01T12:54:31Z | 2024-07-05T07:32:49Z | https://github.com/libjxl/libjxl/issues/3684 | 2,383,780,636 | 3,684 |
[
"libjxl",
"libjxl"
] | I used libjxl from here https://artifacts.lucaversari.it/libjxl/libjxl/latest/
Image viewers cannot open the image if transcoded with --quality=90 --effort=9
Image viewers can open the image if transcoded with --effort=9 in lossless
My system is Windows 10
Here are both images, original and converted
https://c.mail.com/@649572087031144541/eCY5LmaXTTaA6Zy_LIHOBQ | Can't decode the resulting JXL when --quality=90 --effort=9 | https://api.github.com/repos/libjxl/libjxl/issues/3683/comments | 2 | 2024-06-28T19:09:28Z | 2024-07-02T13:35:23Z | https://github.com/libjxl/libjxl/issues/3683 | 2,381,018,429 | 3,683 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
The v0.8.3 tag contains a library with a version number of 0.10.2.
**To Reproduce**
https://github.com/libjxl/libjxl/blob/a7e04be87bd060884cfcc5c3125e6e770f7d1e16/lib/CMakeLists.txt#L7-L8
**Expected behavior**
Version 0.8.3 :-). | 0.8.3 release has a version of number of 0.10.2 | https://api.github.com/repos/libjxl/libjxl/issues/3680/comments | 3 | 2024-06-28T14:08:38Z | 2024-06-28T15:12:39Z | https://github.com/libjxl/libjxl/issues/3680 | 2,380,529,361 | 3,680 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
A clear and concise description of what the bug is.
cjxl.exe and djxl.exe versions (available in jxl-x64-windows-static.zip) in nightly dev builts from June 13, 2024 crash. Older versions (e.g. June 5, 2024) work fine
**To Reproduce**
Steps to reproduce the behavior:
For cjxl.exe and djxl.exe versions from June 13, 2024
cjxl image1.jpg image1.jxl crashes
djxl image2.jxl image2.jpg crashes
but
cjxl -v does not crash and shows verbose as expected
djxl -v does not crash and shows verbose as expected
previous cjxl.exe and djxl.exe work normally
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots or example input/output images to help explain your problem.
**Environment**
- OS: Windows 10 pro 64
**Additional context**
Add any other context about the problem here.
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| crash of recent (from June 13 2024 to present) nightly dev builts windows versions of cjxl and djxl | https://api.github.com/repos/libjxl/libjxl/issues/3666/comments | 24 | 2024-06-26T12:52:28Z | 2024-09-09T08:38:56Z | https://github.com/libjxl/libjxl/issues/3666 | 2,375,260,430 | 3,666 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
I have along time to use this image format. The version I started using for my application is v0.6.x. So I had a problem, what I cant resolve. Please help me to fix it.
A received an report that there was an image jxl cannot be decoded, so that I tried to decode by chrome old version (supported jxl), firefox trunk, ... so I put to the sample decode_oneshot, it failed to decompress this file (what I upload for this report),
I tried all version 0.7.x, 0.8.x, ... 0.10.x .. and the main git version but the image wasnt able to decode.
I tried the version 0.6.x and the image could be decoded. So that please fix for this case. Thanks!


**Environment**
- OS: [e.g. Windows, Android, Linux, iOS]
- Compiler version: [e.g. clang 11.0.1]
- CPU type: [e.g. x86_64, ARM64, ARM32]
- cjxl/djxl version string: [e.g. cjxl [v0.3.7 | SIMD supported: SSE4,Scalar]]
| old encoded image jxl cannot decode by new version | https://api.github.com/repos/libjxl/libjxl/issues/3659/comments | 6 | 2024-06-24T08:59:01Z | 2024-06-25T10:15:19Z | https://github.com/libjxl/libjxl/issues/3659 | 2,369,652,494 | 3,659 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
`cjxl` creates a broken .jxl file in release builds, and hits an assert in debug builds, when encoding some images with `-d 0 -e 1` in combination with `--override_bitdepth`
**To Reproduce**
Using hdr_room.png from here: https://github.com/libjxl/testdata/blob/ff8d743aaba05b3014f17e5475e576242fa979fc/jxl/hdr_room.png
```
$ cjxl -d 0 -e 1 --override_bitdepth 10 hdr_room.png hdr_room.jxl
JPEG XL encoder v0.10.2 0.10.2-1 [AVX2,SSE4,SSE2]
Encoding [Modular, lossless, effort: 1]
Compressed to 1278.4 kB (33.696 bpp).
676 x 449, 35.145 MP/s [35.14, 35.14], , 1 reps, 12 threads.
$ djxl hdr_room.jxl --disable_output
JPEG XL decoder v0.10.2 0.10.2-1 [AVX2,SSE4,SSE2]
Failed to decode image
DecompressJxlToPackedPixelFile failed
```
**Expected behavior**
`cjxl` should never produce an undecodable file
<!--
**Screenshots**
If applicable, add screenshots or example input/output images to help explain your problem.
-->
**Environment**
- OS: Windows
- Compiler version: mingw-w64-x86_64-gcc 14.1.0-3
- CPU type: x86_64
- cjxl/djxl version string: v0.10.2 0.10.2-1 [AVX2,SSE4,SSE2]
**Additional context**
I also built `cjxl` and `djxl` locally from source. Attempting to encode the PNG, or decode the broken JXL file, results in these outputs:
```
cjxl.exe -d 0 -e 1 --override_bitdepth 10 hdr_room.png hdr_room.jxl
JPEG XL encoder v0.10.2 e0ba0826 [AVX2,SSE4,SSE2]
Encoding [Modular, lossless, effort: 1]
Assertion failed: min_limit[i] <= max_limit[i], file ./lib/jxl/enc_fast_lossless.cc, line 384
```
```
djxl.exe hdr_room.jxl --disable_output
JPEG XL decoder v0.10.2 e0ba0826 [AVX2,SSE4,SSE2]
./lib/jxl/dec_ans.cc:210: JXL_FAILURE: Invalid huffman tree number 3, alphabet size 257
./lib/jxl/dec_ans.cc:365: JXL_RETURN_IF_ERROR code=1: DecodeANSCodes(memory_manager, num_histograms, max_alphabet_size, br, code)
./lib/jxl/dec_modular.cc:202: JXL_RETURN_IF_ERROR code=1: DecodeHistograms( memory_manager, reader, (tree.size() + 1) / 2, &code, &context_map)
./lib/jxl/decode.cc:1141: frame processing failed
Failed to decode image
DecompressJxlToPackedPixelFile failed
```
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| Fast lossless encoding is broken with --override_bitdepth | https://api.github.com/repos/libjxl/libjxl/issues/3655/comments | 0 | 2024-06-19T13:45:49Z | 2024-06-25T08:40:29Z | https://github.com/libjxl/libjxl/issues/3655 | 2,362,434,941 | 3,655 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
due to certain limits, I have to build wasm for version 0.6.1 and ran into this issue. not sure how to resolve it. any helps is appreaciated.
Run: BUILD_TARGET=wasm32 ENABLE_WASM_SIMD=1 emconfigure ./ci.sh release
Ouput: error below
--------------
- Build files have been written to: /Users/username/Documents/work/libjxl/build-wasm32
+ cmake_build_and_test
+ ASAN_OPTIONS=detect_leaks=0
+ cmake --build /Users/username/Documents/work/libjxl/build-wasm32 -- all doc
ninja: error: build.ninja:3802: multiple rules generate lib/libjxl.a. | Failed to build wasm for v0.6.1: multiple rules generate lib/libjxl.a | https://api.github.com/repos/libjxl/libjxl/issues/3651/comments | 3 | 2024-06-19T00:38:18Z | 2024-07-05T13:26:54Z | https://github.com/libjxl/libjxl/issues/3651 | 2,360,972,408 | 3,651 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
The `FindHWY.cmake` file uses the `hwy/highway.h` header file to determine the version when `pkgconfig` is not available but this moved to the file `hwy/base.h` and now the version cannot be found anymore.
**To Reproduce**
Build this project somewhere where `pkgconfig` is not available and the latest (`1.2.0`) highway library is installed on the system.
cc @jan-wassenberg
| FindHWY.cmake no longer works with the latest version of highway | https://api.github.com/repos/libjxl/libjxl/issues/3641/comments | 1 | 2024-06-11T22:07:26Z | 2024-06-17T16:01:07Z | https://github.com/libjxl/libjxl/issues/3641 | 2,347,386,079 | 3,641 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.