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" ]
May I ask why the current 'latest' release of JXL (0.8.2; back in june) only has code but no compiled packages? Whereas the previous versions (0.8.1, 0.8.0, etc) have DLLs and compiles for the major systems (windows, linux, etc). As stated on the page "Always prefer to use the latest release", but without the compiles it is a hurdle for some. https://github.com/libjxl/libjxl/releases
Why does current release not have compiled packages?
https://api.github.com/repos/libjxl/libjxl/issues/2821/comments
3
2023-09-23T15:03:29Z
2023-09-25T10:27:04Z
https://github.com/libjxl/libjxl/issues/2821
1,909,901,299
2,821
[ "libjxl", "libjxl" ]
**Describe the bug** I'm writing a script to automate the conversions from jxl to other formats. For some jxl files, it will decode into two files with ec0 and ec1 in the filename, and the one with ec1 is empty image. When this happens, I don't see any error message. **To Reproduce** `djxl IMG_0001.jxl IMG_0001.ppm` will create `IMG_0001-ec0.ppm` and `IMG_0001-ec1.pgm` without any error message. **Expected behavior** Should only create one file **Environment** - OS: Mac - CPU type: ARM - cjxl/djxl version string: JPEG XL decoder v0.8.2 <!-- 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 -->
Some jxl files will be decoded into two files with ec0 and ec1
https://api.github.com/repos/libjxl/libjxl/issues/2813/comments
2
2023-09-21T06:07:15Z
2023-09-22T05:16:50Z
https://github.com/libjxl/libjxl/issues/2813
1,906,182,576
2,813
[ "libjxl", "libjxl" ]
Hi I tried to compress a lossless image progressivly, but the result is more than twice the file size of the lossless version without progressive: ``` 21885191 Red_Fuji_southern_wind_clear_morning.png 11719861 Red_Fuji_southern_wind_clear_morning.jxl 26925947 Red_Fuji_southern_wind_clear_morning-progressive.jxl ``` I was using the latest main branch commit of libjxl but earlier versions seem to have the same problem. When using quality 85 instead of lossless this seems to work fine but version 0.8.1 of libjxl produced smaller images at the same quality setting compared to the main branch; is this intentional? ``` 2386357 Red_Fuji_southern_wind_clear_morning-q85-main.jxl 2274502 Red_Fuji_southern_wind_clear_morning-q85-0.8.1.jxl 2545784 Red_Fuji_southern_wind_clear_morning-q85-progressive-main.jxl 2392863 Red_Fuji_southern_wind_clear_morning-q85-progressive-0.8.1.jxl ```
progressive encoding of lossless images is broken
https://api.github.com/repos/libjxl/libjxl/issues/2812/comments
6
2023-09-21T04:46:02Z
2025-06-11T19:25:34Z
https://github.com/libjxl/libjxl/issues/2812
1,906,093,656
2,812
[ "libjxl", "libjxl" ]
Hey, it's Pedro (see #2485, #2684) and I've got another security suggestion. **Is your feature request related to a problem? Please describe.** Supply-chain security requires us to monitor a bunch of different settings and behaviors. The OpenSSF has therefore developed [Scorecard](https://github.com/ossf/scorecard), a tool that scans a repository to flag potential areas of improvement. I detected the need for the fixes in the PRs linked above via Scorecard. **Describe the solution you'd like** There is also the [Scorecard Action](https://github.com/ossf/scorecard-action). It keeps an eye on the repository and adds suggestions in the project's [Security Panel](https://github.com/libjxl/libjxl/security/code-scanning). I'll send a PR along with this issue so you can take a look at the proposed workflow. **Additional context** libjxl currently scores a 7.2/10, which places it in the top 5% of projects that are important to the open-source ecosystem!
Add the Scorecard Action workflow
https://api.github.com/repos/libjxl/libjxl/issues/2796/comments
0
2023-09-15T20:46:42Z
2023-09-18T11:53:19Z
https://github.com/libjxl/libjxl/issues/2796
1,899,059,107
2,796
[ "libjxl", "libjxl" ]
examples/encode_oneshot.cc line 62 Code: size_t readsize = fread(data.data(), 1, size, file); if ((long)readsize != size) { return false; // <-- missing fclose }
missing fclose
https://api.github.com/repos/libjxl/libjxl/issues/2789/comments
1
2023-09-13T07:51:13Z
2023-09-19T07:16:18Z
https://github.com/libjxl/libjxl/issues/2789
1,893,953,828
2,789
[ "libjxl", "libjxl" ]
We at Gumlet.com are huge fan of this library and we have used this in our latest support for JPEG-XL: https://www.gumlet.com/blog/jpeg-xl/ We would like to sponsor this library in exchange for our logo/link. Can someone let us know if that is possible? Thanks,
Is there a way to sponsor this library?
https://api.github.com/repos/libjxl/libjxl/issues/2784/comments
3
2023-09-10T14:36:22Z
2023-10-05T09:36:44Z
https://github.com/libjxl/libjxl/issues/2784
1,889,169,453
2,784
[ "libjxl", "libjxl" ]
**Describe the bug** cjxl tool can not set quality option. **Environment** - OS: [linux] - cjxl/djxl version string: cjxl v0.8.2 [AVX2,SSE4,SSSE3,SSE2] # cjxl --version cjxl v0.8.2 [AVX2,SSE4,SSSE3,SSE2] Copyright (c) the JPEG XL Project **Additional context** encode image failed with cmd: ``` cjxl -e 9 -q 75 resources/jpg-8bit-gray-scale-with-icc-profile.jpg resources/a.jxl Must not set quality below 100 nor non-zero distance in combination with --lossless_jpeg=1. ```
cjxl[v0.8.2] quality option not work
https://api.github.com/repos/libjxl/libjxl/issues/2780/comments
7
2023-09-08T04:07:08Z
2024-04-11T12:00:22Z
https://github.com/libjxl/libjxl/issues/2780
1,886,899,323
2,780
[ "libjxl", "libjxl" ]
Hi, I would like to read more about how meta-adaptive ANS trees work and how is it different from a MANIAC tree. The comment on this https://gitlab.com/wg1/jpeg-xl/-/issues/55#note_432479750 by @jonsneyers did help me get an insight but it will be really helpful if someone could provide some resources or an explanation on how exactly does MAANS work. This is not an issue/bug, Apologies in advance.
Meta Adaptive ANS
https://api.github.com/repos/libjxl/libjxl/issues/2779/comments
1
2023-09-07T16:41:19Z
2024-04-17T08:41:51Z
https://github.com/libjxl/libjxl/issues/2779
1,886,240,339
2,779
[ "libjxl", "libjxl" ]
Consider a landscape (4000x3000) `orig.jpg`, ```bash $ du orig.jpg 1792 orig.jpg ``` and apply two transformations: 1. Rotation then lossy conversion to jxl 2. Lossy conversion to jxl then rotation ```bash $ convert -rotate 90 orig.jpg rot.jpg $ cjxl -d 2 --lossless_jpeg=0 rot.jpg rot-jxl.jxl $ cjxl -d 2 --lossless_jpeg=0 orig.jpg jxl.jxl $ convert -rotate 90 jxl.jxl jxl-rot.jxl $ du * 728 jxl-rot.jxl 576 jxl.jxl 1792 orig.jpg 600 rot-jxl.jxl 1752 rot.jpg ``` All tests I tried showed that `jxl-rot.jxl` is always larger than `rot-jxl.jxl`. I'm no expert in data formats or compression, but I have two possibilities in mind for this size discrepancy: 1. JPEGXL algorithm is more optimized to portrait images. This is evident by comparing `jxl.jxl` with `rot-jxl.jxl` or `orig.jpg` with `rot.jpg`. But still, 26% increase in size just because of rotation makes me doubt this is the only reason. 2. Imagemagick is doing some complex encoding/re-encoding behind the scenes resulting in unoptimized jxl file. Is there a way to recompress (optimize) an existing jxl file so that running it on `jxl-rot.jxl` gives equal or better results than `rot-jxl.jxl`? ## Lossless tests Curiously, this is the opposite case for lossless conversions. Rotation then conversion: ```bash $ convert -rotate 90 orig.jpg rot.jpg $ du rot.jpg 1752 rot.jpg $ cjxl rot.jpg rot-jxl.jxl $ du rot-jxl.jxl 1448 rot-jxl.jxl ``` Conversion then rotation: ```bash $ cjxl orig.jpg jxl.jxl $ du jxl.jxl 1448 jxl.jxl $ convert -rotate 90 jxl.jxl jxl-rot.jxl $ du jxl-rot.jxl 988 jxl-rot.jxl ```
Optimize an existing jxl image
https://api.github.com/repos/libjxl/libjxl/issues/2778/comments
2
2023-09-07T14:39:34Z
2023-09-29T07:16:54Z
https://github.com/libjxl/libjxl/issues/2778
1,886,036,413
2,778
[ "libjxl", "libjxl" ]
It looks like cjxl hangs during the encoding of some 32 bits float images. When using distance=0 with a 32 bits float .pfm file I get following error after hanging for a while: `cjxl -v --distance=0 slice.pfm compressed_0.jxl` ``` JPEG XL encoder v0.9.0 5d20fbe1 [NEON] Read 4112x3008 image, 49475600 bytes, 2255.7 MP/s Encoding [Modular, lossless, effort: 7] JxlEncoderProcessOutput failed. EncodeImageJXL() failed. ``` The image seems to compress fine with distance=1: `cjxl -v --distance=1 slice.pfm compressed_1.jxl` ``` Read 4112x3008 image, 49475600 bytes, 2264.9 MP/s Encoding [VarDCT, d1.000, effort: 7] Compressed to 2370 bytes (0.002 bpp). 4112 x 3008, 10.663 MP/s [10.66, 10.66], 1 reps, 12 threads. ``` **To Reproduce** `cjxl -v --distance=0 slice.pfm compressed_0.jxl` with the referenced image: https://github.com/ycadoret/data/blob/main/slice.pfm **Expected behavior** The output .jxl to be generated **Environment** - OS: MacOS - Compiler version: 14.0.3 (clang-1403.0.22.14.1) - CPU type: arm64-apple - cjxl/djxl version string: v0.9.0 5d20fbe1 [NEON] **Additional context** I originally ran into the issue with the image codecs python implementation that uses libjxl with a 32 bits buffer. Then I tried using cjxl directly with a saved pfm of the buffer and I observed the same issue. I have a workflow compresses(lossless) many images and this seems to happen about 50% of the time for images with low signal. Apologizes for the big test image, but it was not reproducible with a resampled one. Looks like it could be related to: https://github.com/libjxl/libjxl/issues/2046 but I could still reproduce even with the fix mentioned on the different branch.
Fails to compress some 32bits float images with lossless enabled
https://api.github.com/repos/libjxl/libjxl/issues/2776/comments
3
2023-09-05T19:25:29Z
2025-03-01T18:37:38Z
https://github.com/libjxl/libjxl/issues/2776
1,882,596,164
2,776
[ "libjxl", "libjxl" ]
**Describe the bug** First of all: Not sure if this is a bug, or more of an observation of "intended" behaviour. ApplyLZ77_Optimal can be *extremely* slow on some Inputs in combination with Predictor 0. Not too bad, since it is only used on -e 9 and -P 0 is uncommon/rarely useful, but it "hurt" me when running some automated tests on a set of files where sometimes Predictor 0 would beat Predictor 15 in ratio by a non-insignificant amount (cannot share those files unfortunately). So not an important use case ;). I was able to reproduce the slowdown with one of the conformance test files. On the reproduction case below, cjxl with -P 0 runs for about 43 minutes. Without -P 0 (or with any other specific Predictor), it finishes in about 2-4 seconds. It seems to be working through the match finder loop in the ApplyLZ77_Optimal function for a long time. Feel free to close, if the runtime is an unfortunate price of the optimal parser when not using prediction. To fully confirm I swapped ApplyLZ77_Optimal to ApplyLZ77_LZ77 and it made the file process much faster (about 1 minute or so). **To Reproduce** Get the alpha_nonpremultiplied test case png from the jxl conformance repository: [ref.png](https://github.com/libjxl/conformance/blob/master/testcases/alpha_nonpremultiplied/ref.png) cjxl --disable_output -d 0.0 -e 9 -P 0 ref.png cjxl will now take a long time to process the file compare this to a cjxl run with any other Predictor **Expected behavior** I guess I expected cjxl to take less time with this combination of options? A few minutes, but not 40 minutes. **Environment** - OS: Windows 10 (long time also reproduced on some Ubuntu) - Compiler version: I used the Release v0.8.1 binaries (but also reproduced with recent gcc on Ubuntu) - CPU type: x86_64 - cjxl version: JPEG XL encoder v0.8.1 c27d499 [AVX2,SSE4,SSSE3,Unknown] ,but it should happen on newest main, because the LZ77 code has not been touched in a while
ApplyLZ77_Optimal: Greatly inflated processing time in combination with -P 0 compared to other predictors
https://api.github.com/repos/libjxl/libjxl/issues/2775/comments
0
2023-09-05T12:14:38Z
2023-09-05T12:31:59Z
https://github.com/libjxl/libjxl/issues/2775
1,881,856,868
2,775
[ "libjxl", "libjxl" ]
**Describe the bug** On certain jpeg images, `cjxl` will enter (what seems to be) an infinite loop when called with `--brotli_effort` set to `0` or `1` **To Reproduce** `cjxl --brotli_effort=0 --disable_output a.jpg` ``` JPEG XL encoder v0.8.2 [AVX2,SSE4,SSSE3,SSE2] Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0). Read JPEG image with 96890 bytes. Encoding [Container | JPEG, lossless transcode, effort: 7 | JPEG reconstruction data], (process hangs here...) ``` **Expected behavior** `cjxl --brotli_effort=2 --disable_output a.jpg` ``` JPEG XL encoder v0.8.2 [AVX2,SSE4,SSSE3,SSE2] Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0). Read JPEG image with 96890 bytes. Encoding [Container | JPEG, lossless transcode, effort: 7 | JPEG reconstruction data], Compressed to 83487 bytes including container ``` **Environment** - OS: Alpine Linux - Compiler version: clang 16 - CPU type: x86_64 (AMD Ryzen 5 2500U) - cjxl/djxl version string: cjxl v0.8.2 [AVX2,SSE4,SSSE3,SSE2] **Additional context** Only some images seem to trigger the bug. Probably due to some sort of corruption. I've stumbled upon this issue while batch converting a bunch of images I found on an HDD that is almost old enough to drink. I've attached 2 images where the problem seems to occur. NOTE: the bug happens when using both the official Alpine Linux's `cjxl` (package: `libjxl-tools`) and also with a `cjxl` I compiled myself using - clang 16 - O3 - march=native - mtune=native - lto - and statically linking everything ![a](https://github.com/libjxl/libjxl/assets/47518994/45a1e968-0a3e-4994-b981-4f96bbc6f58b) ![_evil_clown_by_nightrhino](https://github.com/libjxl/libjxl/assets/47518994/26bffd38-27c1-43bc-a18d-6cd0167992ee)
cjxl hangs on certain images with --brotli_effort set to 0 or 1
https://api.github.com/repos/libjxl/libjxl/issues/2769/comments
1
2023-09-03T17:40:30Z
2023-09-04T07:06:05Z
https://github.com/libjxl/libjxl/issues/2769
1,879,177,899
2,769
[ "libjxl", "libjxl" ]
cjxl behaves inconsistently if different bit depths are defined in sBIT PNG chunk. If the bit depths of R, G, B channels are not equal, the sBIT chunk is silently ignored. If the alpha bit depth differs from the color channels, cjxl refuses to decode the PNG file. Here are few example files. The sBIT chunk is processed, the PNG is converted to 1 bit JXL: ![r1g1b1](https://github.com/libjxl/libjxl/assets/32044039/1dd9dfb0-e6da-4036-82e6-e748a85ae390) R:1, G:1, B:1 ![r1g1b1a1](https://github.com/libjxl/libjxl/assets/32044039/440105db-98b8-4264-983d-ba4a51cf038d) R:1, G:1, B:1, A:1 The sBIT chunk is ignored, the PNG file is converted to 8 bit JXL: ![r8g8b1](https://github.com/libjxl/libjxl/assets/32044039/23c62ba1-005f-4fa2-a84b-e0de20947ded) R:8, G:8, B:1 ![r8g8b1a8](https://github.com/libjxl/libjxl/assets/32044039/b7bc2536-7d69-440a-93e4-866d176088c6) R:8, G:8, B:1, A:8 cjxl refuses to decode the PNG file and no JXL file is created: ![r8g8b1a1](https://github.com/libjxl/libjxl/assets/32044039/beb5fa70-ebd4-4a68-b0cd-9d6faecb9ba0) R:8, G:8, B:1, A:1 ![r8g8b8a1](https://github.com/libjxl/libjxl/assets/32044039/5fedb8b4-e824-48dd-aecb-5fd166250697) R:8, G:8, B:8, A:1 My suggestion is to ignore the sBIT chunk if bit depth of any channel differs from others and continue processing the PNG using the information from the file header. Perhaps cjxl could issue a warning about sBIT chunk containing unsupported values.
Inconsistent handling of sBIT values
https://api.github.com/repos/libjxl/libjxl/issues/2764/comments
0
2023-08-30T14:59:41Z
2023-09-04T09:21:48Z
https://github.com/libjxl/libjxl/issues/2764
1,873,860,723
2,764
[ "libjxl", "libjxl" ]
Please add binaries for the new version
package v0.8.2
https://api.github.com/repos/libjxl/libjxl/issues/2757/comments
3
2023-08-28T21:03:40Z
2023-09-25T10:27:35Z
https://github.com/libjxl/libjxl/issues/2757
1,870,503,069
2,757
[ "libjxl", "libjxl" ]
**Describe the bug** libjxl doesn't build on ARM64 using GCC-11 or GCC-12 It appears there are several implicit casts between bool and boolean through the codebase - unsure why this is only triggered on ARM? ``` /io/libjxl/lib/extras/enc/jpg.cc:250:27: error: cannot convert ‘bool’ to ‘boolean’ in assignment 250 | cinfo.optimize_coding = optimize_coding; | ^~~~~~~~~~~~~~~ | | | bool gmake[2]: *** [lib/CMakeFiles/jxl_extras_codec-obj.dir/extras/enc/jpg.cc.o] Error 1 gmake[2]: *** Waiting for unfinished jobs.... [ 30%] Building C object third_party/brotli/CMakeFiles/brotlienc.dir/c/enc/bit_cost.c.o [ 30%] Building C object third_party/brotli/CMakeFiles/brotlienc.dir/c/enc/block_splitter.c.o [ 30%] Building C object third_party/brotli/CMakeFiles/brotlienc.dir/c/enc/brotli_bit_stream.c.o /io/libjxl/lib/jpegli/bitstream.cc: In function ‘bool jpegli::EncodeScan(j_compress_ptr, int)’: /io/libjxl/lib/jpegli/bitstream.cc:802:32: error: cannot convert ‘bool’ to ‘boolean’ in argument passing 802 | by0, max_block_rows, false); | ^~~~~ | | | bool /io/libjxl/lib/jpegli/bitstream.cc: In function ‘void jpegli::ComputeTokens(j_compress_ptr, std::vector<jpegli::TokenArray>*)’: /io/libjxl/lib/jpegli/bitstream.cc:983:27: error: cannot convert ‘bool’ to ‘boolean’ in argument passing 983 | max_block_rows, false); | ^~~~~ | | | bool ``` **Environment** - OS: Ubuntu 22.04 - Compiler version: gcc (Ubuntu 12-20220319-1ubuntu1) 12.0.1 20220319 (experimental) [master r12-7719-g8ca61ad148f] - CPU type: arm64
ARM build broken (bool / boolean casts)
https://api.github.com/repos/libjxl/libjxl/issues/2752/comments
3
2023-08-25T19:25:55Z
2023-09-04T16:00:46Z
https://github.com/libjxl/libjxl/issues/2752
1,867,579,900
2,752
[ "libjxl", "libjxl" ]
**Describe the bug** Libjxl fails to build on i686-w64-mingw32 due to a bug in highway introduced in google/highway@9b80d372f5bd1c51aa806ede430a48b060180657. See: https://github.com/google/highway/issues/1658 It's been fixed in google/highway@a23bfa74865fb426596568749ef62d760a011819. However, the submodule needs to be updated. **Log file** https://gist.github.com/BtbN/6a8ec61a5d1958e6092c96e6d02653e7
Build failure in win32 due to highway regression
https://api.github.com/repos/libjxl/libjxl/issues/2743/comments
2
2023-08-19T12:58:55Z
2024-03-04T10:12:57Z
https://github.com/libjxl/libjxl/issues/2743
1,857,703,922
2,743
[ "libjxl", "libjxl" ]
**Is your feature request related to a problem? Please describe.** ImageJ, and its helper app Fiji are used extensively in microscopy, the backbone of biology research. Researchers generally store images from microscope cameras in .tiff format, but there are a lot of little image manipulations necessary to even view these images. For instance, in epifluorescence microscopy, there will be multiple color channels that are imaged separately using a filter wheel, and contrast is not at all normalized. This happens to also apply to astrophotography imaging. Fiji allows scientists to look at these raw tiff images before putting them through an extensive image correction pipeline. Often, scientists save these images right out of Fiji, and don't need the heavy lifting of registration, background subtraction, and the like that comes with these pipelines. The amount of data that is being collected in .tiff is unsustainable without some form of fundemental technological leap in disk storage, and labs spend millions of dollars buying hundreds of petabytes of on-site storage because they cannot afford the costs of cloud solutions. In astronomy, this data is often stored on magnetic tape, and then physically trucked offsite, because the high-throughput data transfer pipelines that exist are insufficient for the volume of data they are collecting. **Describe the solution you'd like** Implement a JPEG-XL plugin for ImageJ and bundle with Fiji. **Describe alternatives you've considered** Currently, we have engineering integrating the conversion in the imaging pipeline itself. We keep an eye on the other actively-maintained, free, open source, and platform-agnostic solutions. We also have an ML-based compression that we're using concurrently. Until the adoption of JPEG-XL is more complete, and more labs are courageous enough to publish with compressed images, we still have to maintain the original .tiff images. Nothing else out there beats ImageJ through Fiji. **Additional context** There are a lot of imaging pipelines built on ImageJ because it can be used locally on developer and scientist MacBooks, but then also published out to local on-site and cloud infrastructure. Cloud offerings have support for containers, like Docker, but educational institutions and private labs still run almost exclusively on bare-metal and VMs. Operation teams and engineering teams in these institutions are understaffed and overwhelmed because the draw to tech companies and the compensation they can afford is beyond what they can compete with. Most labs affiliated with universities have access to a combination of old-guard engineers and bright-eyed recent college grads. Tools that are mature, free, widely adopted, flexible and have low overhead are the bread and butter of these institutions. But the exponential growth of data is forcing early-adoption of new technologies like JPEG-XL, and they are being shoe-horned in to backend pipelines without front-end support for the scientists. The hope is that this is a win/win, a single change that can both power the back-end and also power the front-end.
JPEG-XL support in Fiji/ImageJ
https://api.github.com/repos/libjxl/libjxl/issues/2740/comments
3
2023-08-17T21:51:51Z
2024-07-11T11:16:59Z
https://github.com/libjxl/libjxl/issues/2740
1,855,754,904
2,740
[ "libjxl", "libjxl" ]
Currently `--upsampling_mode=0` will only take effect with `--already_downsampled`, forcing you to downscale the image beforehand if it was previously enlarged rather than simply using `--resampling=4 --upsampling_mode=0`
Upsampling mode should apply during normal resampling
https://api.github.com/repos/libjxl/libjxl/issues/2738/comments
2
2023-08-17T02:37:09Z
2024-01-18T07:14:50Z
https://github.com/libjxl/libjxl/issues/2738
1,854,145,604
2,738
[ "libjxl", "libjxl" ]
**Describe the bug** When using --already_downsampled, patches will be blank instead of scaling to the new size **To Reproduce** Steps to reproduce the behavior: `cjxl Test.png Test.jxl -d 0 -e 5 --resampling=2 --already_downsampled` **Expected behavior** Patches should scale correctly to the new output resolution **Screenshots** ![image](https://github.com/libjxl/libjxl/assets/51539240/7b98e135-2209-48f9-af73-19237f4df21d) ![image](https://github.com/libjxl/libjxl/assets/51539240/e53352f8-c274-4dda-8da6-d72190c73b75) **Environment** - OS: Windows 10 - CPU type: x86_64 - cjxl/djxl version string: JPEG XL encoder v0.9.0 18fa820 [AVX2,SSE4,SSSE3,SSE2]
Using "already_downsampled" Breaks Patches
https://api.github.com/repos/libjxl/libjxl/issues/2737/comments
0
2023-08-17T02:30:45Z
2023-08-17T13:31:40Z
https://github.com/libjxl/libjxl/issues/2737
1,854,141,465
2,737
[ "libjxl", "libjxl" ]
**Describe the bug** Linker complains about undefined references in libjpegli-static.a: ``` ... [274/277] Linking CXX executable tools\djpegli.exe FAILED: tools/djpegli.exe cmd.exe /C "cd . && G:\MABS\msys64\mingw32\bin\ccache.exe g++ -fstack-protector-strong -mtune=generic -O2 -pipe -mthreads -fno-rtti -funwind-tables -O3 -DNDEBUG -O2 -pipe -static-libgcc -fstack-protector-strong -static-libstdc++ -static -static-libgcc -static-libstdc++ -LG:/MABS/msys64/mingw32/lib -lbrotlidec -lbrotlicommon -lbrotlienc tools/CMakeFiles/djpegli.dir/djpegli.cc.o -o tools\djpegli.exe -Wl,--out-implib,tools\libdjpegli.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic lib/libjxl_extras-static.a tools/libjxl_tool.a G:/MABS/msys64/mingw32/lib/libgif.a G:/MABS/msys64/mingw32/lib/libjpeg.a third_party/sjpeg/libsjpeg.a G:/MABS/local32/lib/libpng.a G:/MABS/msys64/mingw32/lib/libz.a lib/libjxl.a G:/MABS/msys64/mingw32/lib/libbrotlidec.a -lbrotlidec G:/MABS/msys64/mingw32/lib/libbrotlicommon.a -LG:/MABS/msys64/mingw32/lib G:/MABS/msys64/mingw32/lib/libbrotlienc.a -lbrotlienc -lbrotlicommon third_party/liblcms2.a lib/libjxl_threads.a lib/libjpegli-static.a G:/MABS/local32/lib/libhwy.a -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ." G:/MABS/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: lib/libjpegli-static.a(memory_manager.cc.o):memory_manager:(.text+0x59f): undefined reference to `_imp___ZN3hwy16FreeAlignedBytesEPKvPFvPvS2_ES2_' G:/MABS/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: lib/libjpegli-static.a(memory_manager.cc.o):memory_manager:(.text+0x84e): undefined reference to `_imp___ZN3hwy20AllocateAlignedBytesEjPFPvS0_jES0_' G:/MABS/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: lib/libjpegli-static.a(render.cc.o):render.cc:(.text+0xa8d): undefined reference to `_imp___ZN3hwy15GetChosenTargetEv' G:/MABS/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: lib/libjpegli-static.a(render.cc.o):render.cc:(.text+0xa95): undefined reference to `_imp___ZN3hwy16SupportedTargetsEv' ... ``` **To Reproduce** Run [media-autobuild suite](https://github.com/m-ab-s/media-autobuild_suite) to build static ffmpeg including jpegxl ``` CPPFLAGS: -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 CFLAGS: -fstack-protector-strong -mtune=generic -O2 -pipe -mthreads CXXFLAGS: -fstack-protector-strong -mtune=generic -O2 -pipe -mthreads LDFLAGS: -pipe -static-libgcc -fstack-protector-strong -static-libstdc++ ninja -j4 ``` **Expected behavior** Building libjpegxl successfully to be linked in static ffmpeg **Screenshots** [logs.zip](https://github.com/libjxl/libjxl/files/12358713/logs.zip) collected by m-ab-s **Environment** - OS: Windows 10, MSYS2 - Compiler version: GCC 13.1 for MinGW - CPU type: x86 (i686), x86_64 - cjxl/djxl version: git HEAD (99fa2ac3) **Additional context** https://github.com/m-ab-s/media-autobuild_suite/issues/2493
MSYS2/MinGW, GCC 13.1: undefined references in libjpegli-static.a
https://api.github.com/repos/libjxl/libjxl/issues/2736/comments
3
2023-08-16T11:24:04Z
2023-08-23T16:11:32Z
https://github.com/libjxl/libjxl/issues/2736
1,853,036,280
2,736
[ "libjxl", "libjxl" ]
**Is your feature request related to a problem? Please describe.** Currently cjxl allow muxing one single JPEG bitstream into a target JXL container. It would be nice to have the option to specify multiple JPEG bitstream. This would be somewhat akin to ffmpeg and mjpeg: `ffmpeg -framerate 30 -i input%03d.jpg -codec copy output.mjpeg` **Describe the solution you'd like** `cjxl input*.jpg output.jxl` **Describe alternatives you've considered** * https://stackoverflow.com/a/76885453/136285 **Additional context** Possibly related to #871
Muxing multiple JPEG into a JXL animation
https://api.github.com/repos/libjxl/libjxl/issues/2727/comments
3
2023-08-14T08:16:53Z
2024-08-04T02:52:19Z
https://github.com/libjxl/libjxl/issues/2727
1,849,265,603
2,727
[ "libjxl", "libjxl" ]
**Is your feature request related to a problem? Please describe.** Currently when doing lossy encoding of images, image data is not preserved. While this is useful in it's own right, this is behaviour that should be controllable. Below is an example image properties of an AdobeRGB image before and after encoded with libjxl. While the ICC is preserved enough to properly render the image, other data such as description is not preserved. It may also be useful to be able to set this when encoding lossless images to not 1:1 preserve the image properties. ``` Profiles: Profile-icc: 560 bytes Properties: date:create: 2023-08-13T20:35:13+00:00 date:modify: 2023-08-13T20:35:14+00:00 date:timestamp: 2023-08-13T21:06:01+00:00 icc:copyright: Copyright 1999 Adobe Systems Incorporated icc:description: Adobe RGB (1998) jpeg:colorspace: 2 jpeg:sampling-factor: 1x1,1x1,1x1 signature: ff1032bd527737d6dfa401c696059aa590fc842d64aa5f99c38f4c5d3a269aaa ``` ``` Profiles: Profile-icm: 624 bytes Properties: date:create: 2023-08-13T20:41:17+00:00 date:modify: 2023-08-13T20:41:17+00:00 date:timestamp: 2023-08-13T21:09:47+00:00 icc:copyright: CC0 icc:description: RGB_D65_0.639997;0.329997;0.210005;0.710005;0.149998;0.060004_Rel_g0.454707 signature: 90a421619288e10385072a5cb7b1578d2d025ffd6874e6983fbb8e4f0d686305 ``` **Describe the solution you'd like** add a `-preserve_NAME=` flag to set whether or not to preserve the properties as is.
Add flag for controlling ICC
https://api.github.com/repos/libjxl/libjxl/issues/2725/comments
5
2023-08-13T22:10:23Z
2024-04-22T12:31:39Z
https://github.com/libjxl/libjxl/issues/2725
1,848,759,789
2,725
[ "libjxl", "libjxl" ]
**Describe the bug** I used to build libjxl without `-DJPEGXL_STATIC` but have been long turning that on (maybe around 4 months ago). I tried turning it off again by not specifying that flag, but the libjxl failed to build. I've tested this both with MSVC and Clang-Cl, and both failed to build djxl and cjxl in the linking step. Building it with `-DJPEGXL_STATIC=ON` is fine though. Edit: This builds successfully in MSYS2 with Clang compiler. Same version. **CMake Flags** `cmake -G Ninja -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_OPENEXR=OFF -DJPEGXL_ENABLE_TCMALLOC=OFF -DJPEGXL_ENABLE_VIEWERS=OFF -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_TOOLCHAIN_FILE=path/to/my/toolchain.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static --fresh ..` **Expected behavior** Libjxl successfully builds **Environment** - OS: Windows 11 Pro 64-bit Build 22621.2134 - Compiler version: Visual Studio 2022 17.6.5 using Windows 11 SDK MSVC 19.36.32537 for x64 clang version 16.0.5 Target: x86_64-pc-windows-msvc Thread model: posix - CPU type: x86_64, Intel Core i5 7200U - cjxl/djxl version string: cjxl v0.9.0 18fa8207 [AVX2,SSE4,SSSE3,SSE2] **Error Output** ``` FAILED: tools/djxl.exe cmd.exe /C "cd . && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=tools\CMakeFiles\djxl.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\Llvm\x64\bin\lld-link.exe /nologo tools\CMakeFiles\djxl.dir\djxl_main.cc.obj /out:tools\djxl.exe /implib:tools\djxl.lib /pdb:tools\djxl.pdb /version:0.0 /machine:x64 /INCREMENTAL:NO /subsystem:console lib\jxl_extras_codec.lib lib\jxl_threads.lib tools\jxl_tool.lib lib\jxl.lib third_party\highway\hwy.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cmd.exe /C "cd /D D:\Dev\libjxl\bld\tools && "C:\Program Files\PowerShell\7-preview\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/Users/Alifian/scoop/apps/vcpkg/current/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary D:/Dev/libjxl/bld/tools/djxl.exe -installedDir C:/Users/Alifian/scoop/apps/vcpkg/current/installed/x64-windows-static/bin -OutVariable out"" LINK: command "C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\Llvm\x64\bin\lld-link.exe /nologo tools\CMakeFiles\djxl.dir\djxl_main.cc.obj /out:tools\djxl.exe /implib:tools\djxl.lib /pdb:tools\djxl.pdb /version:0.0 /machine:x64 /INCREMENTAL:NO /subsystem:console lib\jxl_extras_codec.lib lib\jxl_threads.lib tools\jxl_tool.lib lib\jxl.lib third_party\highway\hwy.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:tools\djxl.exe.manifest" failed (exit code 1) with the following output: lld-link: error: undefined symbol: enum jxl::extras::Codec __cdecl jxl::extras::CodecFromPath(class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>, unsigned __int64 *__restrict, class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> *, class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> *) >>> referenced by D:\Dev\libjxl\tools\djxl_main.cc >>> tools\CMakeFiles\djxl.dir\djxl_main.cc.obj lld-link: error: undefined symbol: public: static class std::unique_ptr<class jxl::extras::Encoder, struct std::default_delete<class jxl::extras::Encoder>> __cdecl jxl::extras::Encoder::FromExtension(class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>) >>> referenced by D:\Dev\libjxl\tools\djxl_main.cc >>> tools\CMakeFiles\djxl.dir\djxl_main.cc.obj lld-link: error: undefined symbol: class std::unique_ptr<class jxl::extras::Encoder, struct std::default_delete<class jxl::extras::Encoder>> __cdecl jxl::extras::GetAPNGEncoder(void) >>> referenced by D:\Dev\libjxl\tools\djxl_main.cc >>> tools\CMakeFiles\djxl.dir\djxl_main.cc.obj lld-link: error: undefined symbol: class std::unique_ptr<class jxl::extras::Encoder, struct std::default_delete<class jxl::extras::Encoder>> __cdecl jxl::extras::GetJPEGEncoder(void) >>> referenced by D:\Dev\libjxl\tools\djxl_main.cc >>> tools\CMakeFiles\djxl.dir\djxl_main.cc.obj lld-link: error: undefined symbol: class std::unique_ptr<class jxl::extras::Encoder, struct std::default_delete<class jxl::extras::Encoder>> __cdecl jxl::extras::GetEXREncoder(void) >>> referenced by D:\Dev\libjxl\tools\djxl_main.cc >>> tools\CMakeFiles\djxl.dir\djxl_main.cc.obj lld-link: error: undefined symbol: double __cdecl jxl::Now(void) >>> referenced by D:\Dev\libjxl\tools\djxl_main.cc >>> tools\CMakeFiles\djxl.dir\djxl_main.cc.obj lld-link: error: undefined symbol: bool __cdecl jxl::extras::DecodeImageJXL(unsigned char const *, unsigned __int64, struct jxl::extras::JXLDecompressParams const &, unsigned __int64 *, class jxl::extras::PackedPixelFile *, class std::vector<unsigned char, class std::allocator<unsigned char>> *) >>> referenced by D:\Dev\libjxl\tools\djxl_main.cc >>> tools\CMakeFiles\djxl.dir\djxl_main.cc.obj [307/310] Linking CXX executable tools\cjxl.exe FAILED: tools/cjxl.exe cmd.exe /C "cd . && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=tools\CMakeFiles\cjxl.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\Llvm\x64\bin\lld-link.exe /nologo tools\CMakeFiles\cjxl.dir\cjxl_main.cc.obj /out:tools\cjxl.exe /implib:tools\cjxl.lib /pdb:tools\cjxl.pdb /version:0.0 /machine:x64 /INCREMENTAL:NO /subsystem:console lib\jxl_extras_codec.lib lib\jxl_threads.lib tools\jxl_tool.lib lib\jxl.lib third_party\highway\hwy.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cmd.exe /C "cd /D D:\Dev\libjxl\bld\tools && "C:\Program Files\PowerShell\7-preview\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/Users/Alifian/scoop/apps/vcpkg/current/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary D:/Dev/libjxl/bld/tools/cjxl.exe -installedDir C:/Users/Alifian/scoop/apps/vcpkg/current/installed/x64-windows-static/bin -OutVariable out"" LINK: command "C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\Llvm\x64\bin\lld-link.exe /nologo tools\CMakeFiles\cjxl.dir\cjxl_main.cc.obj /out:tools\cjxl.exe /implib:tools\cjxl.lib /pdb:tools\cjxl.pdb /version:0.0 /machine:x64 /INCREMENTAL:NO /subsystem:console lib\jxl_extras_codec.lib lib\jxl_threads.lib tools\jxl_tool.lib lib\jxl.lib third_party\highway\hwy.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:tools\cjxl.exe.manifest" failed (exit code 1) with the following output: lld-link: error: undefined symbol: double __cdecl jxl::Now(void) >>> referenced by D:\Dev\libjxl\tools\cjxl_main.cc >>> tools\CMakeFiles\cjxl.dir\cjxl_main.cc.obj lld-link: error: undefined symbol: class jxl::Status __cdecl jxl::extras::DecodeBytes(class jxl::Span<unsigned char const>, class jxl::extras::ColorHints const &, class jxl::extras::PackedPixelFile *, struct jxl::SizeConstraints const *, enum jxl::extras::Codec *) >>> referenced by D:\Dev\libjxl\tools\cjxl_main.cc >>> tools\CMakeFiles\cjxl.dir\cjxl_main.cc.obj lld-link: error: undefined symbol: bool __cdecl jxl::extras::EncodeImageJXL(struct jxl::extras::JXLCompressParams const &, class jxl::extras::PackedPixelFile const &, class std::vector<unsigned char, class std::allocator<unsigned char>> const *, class std::vector<unsigned char, class std::allocator<unsigned char>> *) >>> referenced by D:\Dev\libjxl\tools\cjxl_main.cc >>> tools\CMakeFiles\cjxl.dir\cjxl_main.cc.obj lld-link: error: undefined symbol: bool __cdecl jxl::extras::CanDecode(enum jxl::extras::Codec) >>> referenced by D:\Dev\libjxl\tools\cjxl_main.cc >>> tools\CMakeFiles\cjxl.dir\cjxl_main.cc.obj [308/310] Linking CXX executable encode_oneshot.exe [309/310] Linking CXX executable tools\djpegli.exe [310/310] Linking CXX executable tools\cjpegli.exe ninja: build stopped: subcommand failed. ```
Failed to build libjxl without `-DJPEGXL_STATIC` on MSVC
https://api.github.com/repos/libjxl/libjxl/issues/2723/comments
1
2023-08-09T18:07:37Z
2024-07-02T15:04:21Z
https://github.com/libjxl/libjxl/issues/2723
1,843,766,314
2,723
[ "libjxl", "libjxl" ]
libjxl-main/tools/fast_lossless/pam-input.h line 254 Code: *out = (unsigned char*)malloc(*outsize); if (!(*out)) return false; // <-- missing fclose size_t readsize; readsize = fread(*out, 1, *outsize, file); fclose(file); if (readsize != *outsize) return false; return true; }
missing fclose
https://api.github.com/repos/libjxl/libjxl/issues/2721/comments
1
2023-08-09T13:38:12Z
2023-08-09T15:47:46Z
https://github.com/libjxl/libjxl/issues/2721
1,843,263,510
2,721
[ "libjxl", "libjxl" ]
The output resulted from no-compressed png encoder of demo, even though can be displayed on Chrome/Edge, failed to do so on Firefox with error "Image corrupt or truncated". More over, it also fails when passed into createImageBitmap on Chrome with "DOMException: The source image could not be decoded" (yet when passed into image tag, it still loads ok on Chrome). I think the encoder is broken somewhere?
No-compressed png encoder fails on Firefox
https://api.github.com/repos/libjxl/libjxl/issues/2720/comments
7
2023-08-09T10:54:22Z
2025-03-01T18:19:06Z
https://github.com/libjxl/libjxl/issues/2720
1,842,980,638
2,720
[ "libjxl", "libjxl" ]
libjxl-main/plugins/gimp/file-jxl-save.cc line 361 Code: // Advanced Settings Frame std::vector<GtkWidget*> advanced_opts; // <-- unused
unused variable
https://api.github.com/repos/libjxl/libjxl/issues/2701/comments
0
2023-08-02T09:14:25Z
2023-08-03T07:21:39Z
https://github.com/libjxl/libjxl/issues/2701
1,832,776,003
2,701
[ "libjxl", "libjxl" ]
**Describe the bug** I am experimenting with the lossless conversion of some JPEG files (extracted from large tiled TIFF files). Some of these images convert without an issue, but others have an error (JxlEncoderError JXL_ENC_ERR_JBRD) when `JxlEncoderAddJPEGFrame` is called with no further information. **To Reproduce** Set up an encoder and add a JPEG frame (see additional context). I have included some tiles extracted from the TIFFs that successfully convert and some that do not. I also link to the original TIFF files as they are quite large. I hope that GitHub does not alter the files 🤞. ***Passing JPEGs*** ![TCGA-S3-A6ZH-01Z-00-DX1@JPEG-Tile-Index-0](https://github.com/libjxl/libjxl/assets/4615004/53b82235-a14e-46d6-9850-37b9b1dbe833) ![TCGA-S3-A6ZH-01Z-00-DX1@JPEG-Tile-Index-1874](https://github.com/libjxl/libjxl/assets/4615004/27e109be-8073-4f81-a6b4-a30ec1aa8cb8) ![TCGA-S3-A6ZH-01Z-00-DX1@JPEG-Tile-Index-1875](https://github.com/libjxl/libjxl/assets/4615004/e44d2011-c1ea-4f20-b897-ab88503798d5) Original 446 MB TIFF file at https://portal.gdc.cancer.gov/files/ce717a46-a25a-42f3-8402-10239838d0c6 ***Failing JPEGS*** ![TCGA-AN-A046-01Z-00-DX1@JPEG-Tile-Index-0](https://github.com/libjxl/libjxl/assets/4615004/1e417113-39d1-4f26-bb17-e70d4ff556b8) ![TCGA-AN-A046-01Z-00-DX1@JPEG-Tile-Index-2430](https://github.com/libjxl/libjxl/assets/4615004/6a7616b2-d127-4d32-8a22-cad4981ac374) ![TCGA-AN-A046-01Z-00-DX1@JPEG-Tile-Index-2930](https://github.com/libjxl/libjxl/assets/4615004/7497f505-6120-448e-9c6d-178fda584fd8) Original 422 MB TIFF file at https://portal.gdc.cancer.gov/files/5a69a438-d7b2-40fa-afc1-0d02de55ee02 **Expected behavior** Lossless conversion of both sets of JPEG files is expected to occur without error. **Environment** - OS: macOS 13.4.1 (c) - Compiler version: n/a - CPU type: Apple M1 - cjxl/djxl version string: 0.8.2 (via conda-forge) **Additional context** I am converting the images using a simple Python ctype script which calls: 1. JxlEncoderCreate 2. JxlEncoderFrameSettingsCreate 3. JxlEncoderStoreJPEGMetadata 4. JxlEncoderAddJPEGFrame <- error here, then calling JxlEncoderGetError 5. JxlEncoderProcessOutput (until no more output) 6. JxlEncoderDestroy
JPEG Bitstream Reconstruction (`JxlEncoderAddJPEGFrame`) Failing for Some Images
https://api.github.com/repos/libjxl/libjxl/issues/2693/comments
3
2023-07-31T16:05:15Z
2023-10-12T15:19:52Z
https://github.com/libjxl/libjxl/issues/2693
1,829,575,667
2,693
[ "libjxl", "libjxl" ]
**Issue under reworking...**
How to build for Vite?
https://api.github.com/repos/libjxl/libjxl/issues/2690/comments
0
2023-07-30T07:27:41Z
2023-08-01T08:40:26Z
https://github.com/libjxl/libjxl/issues/2690
1,827,836,365
2,690
[ "libjxl", "libjxl" ]
**Describe the bug** `JxlDecoderReleaseJPEGBuffer` is [supposed to](https://libjxl.readthedocs.io/en/latest/api_decoder.html#group__libjxl__decoder_1ga7e90657bbd64b619228249f0e3ca093f) return the number of bytes of the output buffer that have not yet been written to. In my use, it actually always returns the full size of the buffer, indicating that none of the buffer was written to, even though the buffer does actually contain a partial JPEG file (I verified with hashes that the full buffer I had allocated thus far matched that many bytes of the original JPEG). **To Reproduce** - Initialize a `JxlDecoder` and provide it the bytes of a recompressed JPEG file as input - Provide a JPEG buffer that is not large enough and call `JxlDecoderProcessInput` and then `JxlDecoderReleaseJPEGBuffer` **Expected behavior** Either the buffer contains garbage and `JxlDecoderReleaseJPEGBuffer` returns the size of the buffer as it does currently (if it needs more room before it can do any work, or something like that), or some of the buffer has been written to (in practice it seems that all of it is) and `JxlDecoderReleaseJPEGBuffer` accurately reports how much. **Screenshots** I attached the C++ code I've been using to test this (GitHub wouldn't let me upload it with the right extension). It's heavily modified from the `decode_oneshot` example. You can see that libjxl reports it has not written anything (line 84 is the printf)... ``` $ clang++ -o decode_oneshot decode_oneshot.cc $(pkg-config --libs --cflags libjxl) $ ./decode_oneshot.cc botw.jxl /dev/null /dev/null [...] 4096 bytes were not written. 4096-byte buffer now holds 0 bytes of jpeg data first few bytes of buffer: ffd8ffe14b894578 status 6 8192 bytes were not written. 8192-byte buffer now holds 0 bytes of jpeg data first few bytes of buffer: ffd8ffe14b894578 status 6 16384 bytes were not written. 16384-byte buffer now holds 0 bytes of jpeg data first few bytes of buffer: ffd8ffe14b894578 ``` ...but what is actually in the buffer corresponds to the JPEG file (and I verified this as far as 131072 bytes on this particular file, as the next time it resizes the buffer it actually fits the whole output): ``` $ djxl botw.jxl botw.jpg $ hexdump -C botw.jpg | head -n1 00000000 ff d8 ff e1 4b 89 45 78 69 66 00 00 4d 4d 00 2a |....K.Exif..MM.*| ``` [decode_oneshot.txt](https://github.com/libjxl/libjxl/files/12206751/decode_oneshot.txt) ![botw jxl](https://github.com/libjxl/libjxl/assets/7763597/76dffc01-220c-493f-aab6-3fbb521ac2f4) **Environment** - OS: Arch Linux - Compiler version: clang 15.0.7 - CPU type: x86_64 - cjxl/djxl version string: djxl v0.9.0 190d44fb [AVX2,SSE4,SSSE3,SSE2] **Additional context**
JxlDecoderReleaseJPEGBuffer always reports none of the buffer has been written to even when it has
https://api.github.com/repos/libjxl/libjxl/issues/2689/comments
2
2023-07-29T09:54:41Z
2023-08-03T22:06:00Z
https://github.com/libjxl/libjxl/issues/2689
1,827,426,594
2,689
[ "libjxl", "libjxl" ]
Currently cjxl will read XMP and EXIF metadata from iTXt and tEXt chunks, but they're also used to store raw text with a tag at the start which is ignored. If those tags could be turned into XMP or EXIF entries as fallback, or just a 'text' container as Jon has suggested on Discord, then the data would be retained and can be read later on. As said in #2641, Stable Diffusion stores it's prompt settings for each image using a `Parameters` tag, and [VRCX](https://github.com/vrcx-team/VRCX/blob/master/ScreenshotHelper.cs) stores session data in screenshots using the `Description` tag. May also be related to #1498 depending on what the original poster meant.
PNG tEXt chunks discarded unless XMP or EXIF
https://api.github.com/repos/libjxl/libjxl/issues/2687/comments
5
2023-07-27T18:24:50Z
2023-08-02T19:58:12Z
https://github.com/libjxl/libjxl/issues/2687
1,824,943,892
2,687
[ "libjxl", "libjxl" ]
**Describe the bug** The official JPEG-XL website states "Lossless JPEG transcoding: about 20% smaller" - however, this some perfectly in-spec jpeg encoding methods are not supported and result only in a cryptic error message "JxlEncoderAddJPEGFrame() failed". **To Reproduce** Encode 1. lossless jpeg (cjpeg -lossless 7), 2. arithmetic jpeg (cjpeg -arithmetic), 3. hdr jpeg (cjpeg -precision 12) and convert with cjxl --lossless_jpeg=1. I've attached respective samples. **Expected behavior** Expected behavior would either be a verbose error message (lossless | arithmetic | hdr not supported) or ideally a lossless conversion to jxl. The arithmetic encoding is easy to remove tough (jpegtran -optimize). **Environment** - OS: Windows - Compiler version: https://artifacts.lucaversari.it/libjxl/libjxl/latest/jxl-x64-windows-static.zip - CPU type: x64 - cjxl/djxl version string: cjxl v0.9.0 9b275e5 [SSE4,SSSE3,SSE2] **Additional context** ... the sample jpeg won't show inline at all or not in all browers, use the direct links. https://github.com/libjxl/libjxl/assets/10775306/7905df08-0fc2-400e-a64b-66f3221bce0b https://github.com/libjxl/libjxl/assets/10775306/7e4980f2-58c8-4f71-8816-c78a98207bc4 https://github.com/libjxl/libjxl/assets/10775306/21223d30-2c6d-47c6-9185-495a984ca79b ![sample-hdr12](https://github.com/libjxl/libjxl/assets/10775306/7905df08-0fc2-400e-a64b-66f3221bce0b) ![sample-lossless](https://github.com/libjxl/libjxl/assets/10775306/7e4980f2-58c8-4f71-8816-c78a98207bc4) ![sample-arithmetic](https://github.com/libjxl/libjxl/assets/10775306/21223d30-2c6d-47c6-9185-495a984ca79b)
Lossless transcoding of lossless, arithmetic, hdr legacy JPEG
https://api.github.com/repos/libjxl/libjxl/issues/2685/comments
4
2023-07-26T16:41:51Z
2024-04-22T09:49:01Z
https://github.com/libjxl/libjxl/issues/2685
1,822,791,072
2,685
[ "libjxl", "libjxl" ]
**Is your feature request related to a problem? Please describe.** When developing with CI workflows, it's common to version-pin dependencies (i.e. `actions/checkout@v3`). However, version tags are mutable, so a malicious attacker could overwrite a version tag to point to a malicious or vulnerable commit instead. **Describe the solution you'd like** Pinning workflow dependencies by hash ensures the dependency is immutable and its behavior is guaranteed. These dependencies can be kept up-to-date with dependabot. Whenever a new version of an Action is released, you'll receive a PR updating both its hash and the version comment (see [this repo](https://github.com/pnacht/logr/pulls) as an example). **Additional context** Hi, it's Pedro from Google and I'm back (see #2485) with this security suggestion. I'll send a PR pinning the dependencies and adding dependabot along with this issue.
Hash-pin workflow Actions and keep them updated
https://api.github.com/repos/libjxl/libjxl/issues/2683/comments
0
2023-07-26T15:01:34Z
2023-08-02T17:29:11Z
https://github.com/libjxl/libjxl/issues/2683
1,822,613,785
2,683
[ "libjxl", "libjxl" ]
**Is your feature request related to a problem? Please describe.** The "end goal" is to use JPEG XL images in flutter just like you can now use JPEG/PNG/.... **Describe the solution you'd like** Probably first a binding library from libjxl (C++) to Dart. And from there another library to integrate with Flutter. **Describe alternatives you've considered** Google killed the alternatives. It was supposed to land in Chrome (it was there) but google killed it. And with that same reasoning they refuse to add it in Flutter. **Additional context** Does such a library exist? Would it be viable to start a bounty project for this? I would pledge some $ for that for sure! But i suppose the implicit question is also if libjxl is ready - in terms of features and performance - to run in places where flutter is run. That would be mainly on mobile (android/ios) apps but not exclusively! It should also work fine on the desktop platforms out there (win/mac/lin).
Dart + Flutter bindings?
https://api.github.com/repos/libjxl/libjxl/issues/2681/comments
7
2023-07-25T22:46:12Z
2024-01-31T09:46:34Z
https://github.com/libjxl/libjxl/issues/2681
1,821,276,105
2,681
[ "libjxl", "libjxl" ]
Hello, When someone builds libjxl using `JPEGXL_FORCE_SYSTEM_HWY`, cmake searches for `find_package(HWY 1.0.0)`. https://github.com/libjxl/libjxl/blob/06d6570bc5427ec00188e1e5347cb1b184eda476/third_party/CMakeLists.txt#L34C3-L34C26 libjxl from git no longer works with highway 1.0.0 - 1.0.3 because symbol `HWY_AVX3_ZEN4` is used. I think it would be good to require newer highway version explicitly.
Bump requirement for highway library
https://api.github.com/repos/libjxl/libjxl/issues/2676/comments
1
2023-07-20T19:47:17Z
2023-08-02T08:36:41Z
https://github.com/libjxl/libjxl/issues/2676
1,814,694,712
2,676
[ "libjxl", "libjxl" ]
I have one strange question, and in same time, feature request. Can be JNG format (if explain shortly, it is JPEG wrapper with PNG or JPEG alpha channel, which can be disassembled into two image) or JPEG with PNG alpha channel constructed into JPEG XL? Without any quality loss (except may be alpha channel, which may be is PNG).
Can be JNG or JPEG with PNG alpha channel constructed into JPEG XL?
https://api.github.com/repos/libjxl/libjxl/issues/2673/comments
5
2023-07-20T11:51:50Z
2023-08-03T07:02:19Z
https://github.com/libjxl/libjxl/issues/2673
1,813,817,318
2,673
[ "libjxl", "libjxl" ]
**Describe the bug** Encoding an image with jpegli using XYB results in a stretched image with stripes and makes the image almost black and white. **To Reproduce** Download 64-bit nightly libjxl for Windows (I used https://artifacts.lucaversari.it/libjxl/libjxl/2023-07-19T08%3A42%3A59Z_0e8f059101cdd6acb4a871bfca22b50691971d17/jxl-x64-windows-static.zip) Open PowerShell Convert any PNG image with cjpegli using XYB. `.\cjpegli ..\input.png ..\output.jpg --xyb` **Expected behavior** The image should not be stretched, have stripes, or almost be black and white. **Screenshots** Inputs: ![freddy](https://github.com/libjxl/libjxl/assets/114287709/12e11c15-2f14-4308-913e-73b3d21aecbb) ![pattern](https://github.com/libjxl/libjxl/assets/114287709/fd38e79f-46f0-4e23-87da-d2859c847017) ![colors](https://github.com/libjxl/libjxl/assets/114287709/2892a4b7-8b1c-4643-8423-7557057529b5) Outputs: ![freddy](https://github.com/libjxl/libjxl/assets/114287709/4c7c220b-900a-4881-8d8e-5a98c7f0f070) ![pattern](https://github.com/libjxl/libjxl/assets/114287709/e8cefa79-bc59-4876-adf6-bc3bd8e3ea5e) Weirdly this doesn't happen here... ![colors](https://github.com/libjxl/libjxl/assets/114287709/46cb79dd-5fdd-4575-9ad7-936f0184b81f) **Environment** - OS: Windows 10 22H2 - Compiler version: I dunno - CPU type: 64-bit - cjxl/djxl version string: v0.9.0 1a7931e [AVX2,SSE4,SSSE3,SSE2] **Additoinal info** I also tested the nightly build from 17th July too which outputs the same result. I think it could be something to do with the colors in the input that causes this.
Images with alpha mess with jpegli using XYB
https://api.github.com/repos/libjxl/libjxl/issues/2671/comments
1
2023-07-19T14:41:00Z
2024-04-22T18:43:01Z
https://github.com/libjxl/libjxl/issues/2671
1,812,108,849
2,671
[ "libjxl", "libjxl" ]
Hello, there is an report from gentoo: https://bugs.gentoo.org/910099 (media-libs/libjxl-0.8.2-r1 adds -Werror flag on its own) There is a following line in https://github.com/libjxl/libjxl/blob/0e265bfb2f5554d476c7014e43fb927a174b576e/tools/CMakeLists.txt#L386C1-L386C66 `target_compile_options(libjxl_test PRIVATE -Wall -Wextra -Werror)` Would it be possible to make the -Werror optional?
Test builds with -Werror
https://api.github.com/repos/libjxl/libjxl/issues/2670/comments
1
2023-07-17T16:00:20Z
2024-07-06T09:31:27Z
https://github.com/libjxl/libjxl/issues/2670
1,808,088,729
2,670
[ "libjxl", "libjxl" ]
**Describe the bug** Compilation to wasm fails on `jxl/enc_aux_out.h` The error is found on l. 68: error: definition of implicit copy assignment operator for 'AuxOut' is deprecated because it has a user-declared copy constructor `68 | AuxOut(const AuxOut&) = default;` **To Reproduce** The libjxl repo is at the commit `0e265bfb2f5554d476c7014e43fb927a174b576e` (with all submodules properly pulled) the emsdk is at the commit `b6df670bdb7cc696804495306e99a604f6641b38` I followed the recommendations found here: https://github.com/libjxl/libjxl/blob/main/doc/building_wasm.md The command line used to launch the compilation was exactly: `BUILD_TARGET=wasm32 SKIP_TEST=1 emconfigure ./ci.sh release` **Expected behavior** Expected a flawless compilation (as it did a few weeks ago) **Environment** ubuntu 23.04 **Additional context** Here is the full output: ``` FAILED: lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_frame.cc.o /forge/emsdk/upstream/emscripten/em++ -DFJXL_ENABLE_AVX512=0 -DHWY_DISABLED_TARGETS="(HWY_SSSE3|HWY_AVX3|HWY_AVX3_ZEN4|HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=9 -DJPEGXL_PATCH_VERSION=0 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/forge/libjxl -I/forge/libjxl/third_party/highway -I/forge/libjxl/third_party/brotli/c/include -I/forge/libjxl/third_party/skcms -isystem /forge/libjxl/build-wasm32/lib/include -pthread -fno-rtti -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O3 -DNDEBUG -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fmacro-prefix-map=/forge/libjxl=. -Wno-builtin-macro-redefined -Wall -Werror -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -Wdeprecated-increment-bool -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wgnu-redeclared-enum -Winfinite-recursion -Wliteral-conversion -Wno-c++98-compat -Wno-unused-command-line-argument -Wprivate-header -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety-analysis -Wundefined-func-template -Wunreachable-code -Wunused-comparison -fsized-deallocation -fno-exceptions -fmath-errno -fnew-alignment=8 -fno-cxx-exceptions -fno-slp-vectorize -fno-vectorize -disable-free -disable-llvm-verifier -DJPEGXL_ENABLE_SKCMS=1 -DJPEGXL_BUNDLE_SKCMS=1 -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -std=c++11 -MD -MT lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_frame.cc.o -MF lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_frame.cc.o.d -o lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_frame.cc.o -c /forge/libjxl/lib/jxl/enc_frame.cc In file included from /forge/libjxl/lib/jxl/enc_frame.cc:38: /forge/libjxl/lib/jxl/enc_aux_out.h:68:3: error: definition of implicit copy assignment operator for 'AuxOut' is deprecated because it has a user-declared copy constructor [-Werror,-Wdeprecated-copy] 68 | AuxOut(const AuxOut&) = default; | ^ /forge/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__algorithm/move.h:41:17: note: in implicit copy assignment operator for 'jxl::AuxOut' first required here 41 | *__result = _IterOps<_AlgPolicy>::__iter_move(__first); | ^ /forge/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__algorithm/copy_move_common.h:107:19: note: in instantiation of function template specialization 'std::__move_loop<std::_ClassicAlgPolicy>::operator()<std::reverse_iterator<jxl::AuxOut *>, std::reverse_iterator<jxl::AuxOut *>, std::reverse_iterator<jxl::AuxOut *>>' requested here 107 | auto __result = _Algorithm()(std::move(__range.first), std::move(__range.second), std::__unwrap_iter(__out_first)); | ^ /forge/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__algorithm/copy_move_common.h:152:19: note: in instantiation of function template specialization 'std::__unwrap_and_dispatch<std::__move_loop<std::_ClassicAlgPolicy>, std::reverse_iterator<jxl::AuxOut *>, std::reverse_iterator<jxl::AuxOut *>, std::reverse_iterator<jxl::AuxOut *>, 0>' requested here 152 | return std::__unwrap_and_dispatch<_NaiveAlgorithm>(std::move(__first), std::move(__last), std::move(__out_first)); | ^ /forge/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__algorithm/move.h:113:15: note: in instantiation of function template specialization 'std::__dispatch_copy_or_move<std::_ClassicAlgPolicy, std::__move_loop<std::_ClassicAlgPolicy>, std::__move_trivial, std::reverse_iterator<jxl::AuxOut *>, std::reverse_iterator<jxl::AuxOut *>, std::reverse_iterator<jxl::AuxOut *>>' requested here 113 | return std::__dispatch_copy_or_move<_AlgPolicy, __move_loop<_AlgPolicy>, __move_trivial>( | ^ /forge/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__algorithm/move.h:123:15: note: in instantiation of function template specialization 'std::__move<std::_ClassicAlgPolicy, std::reverse_iterator<jxl::AuxOut *>, std::reverse_iterator<jxl::AuxOut *>, std::reverse_iterator<jxl::AuxOut *>>' requested here 123 | return std::__move<_ClassicAlgPolicy>(std::move(__first), std::move(__last), std::move(__result)).second; | ^ /forge/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/uninitialized_algorithms.h:639:17: note: in instantiation of function template specialization 'std::move<std::reverse_iterator<jxl::AuxOut *>, std::reverse_iterator<jxl::AuxOut *>>' requested here 639 | return std::move(__first1, __last1, __first2); | ^ /forge/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/vector:917:27: note: in instantiation of function template specialization 'std::__uninitialized_allocator_move_if_noexcept<std::allocator<jxl::AuxOut>, std::reverse_iterator<jxl::AuxOut *>, std::reverse_iterator<jxl::AuxOut *>, jxl::AuxOut, void>' requested here 917 | __v.__begin_ = std::__uninitialized_allocator_move_if_noexcept( | ^ /forge/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/vector:1048:9: note: in instantiation of member function 'std::vector<jxl::AuxOut>::__swap_out_circular_buffer' requested here 1048 | __swap_out_circular_buffer(__v); | ^ /forge/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/vector:1910:15: note: in instantiation of member function 'std::vector<jxl::AuxOut>::__append' requested here 1910 | this->__append(__sz - __cs); | ^ /forge/libjxl/lib/jxl/enc_frame.cc:1246:16: note: in instantiation of member function 'std::vector<jxl::AuxOut>::resize' requested here 1246 | aux_outs.resize(num_threads); | ^ 1 error generated. em++: error: '/forge/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_SHARED_MEMORY__=1 -DEMSCRIPTEN --sysroot=/forge/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -DFJXL_ENABLE_AVX512=0 -DHWY_DISABLED_TARGETS=(HWY_SSSE3|HWY_AVX3|HWY_AVX3_ZEN4|HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV) -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=9 -DJPEGXL_PATCH_VERSION=0 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -I/forge/libjxl -I/forge/libjxl/third_party/highway -I/forge/libjxl/third_party/brotli/c/include -I/forge/libjxl/third_party/skcms -isystem /forge/libjxl/build-wasm32/lib/include -pthread -fno-rtti -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O3 -DNDEBUG -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fmacro-prefix-map=/forge/libjxl=. -Wno-builtin-macro-redefined -Wall -Werror -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -Wdeprecated-increment-bool -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wgnu-redeclared-enum -Winfinite-recursion -Wliteral-conversion -Wno-c++98-compat -Wno-unused-command-line-argument -Wprivate-header -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety-analysis -Wundefined-func-template -Wunreachable-code -Wunused-comparison -fsized-deallocation -fno-exceptions -fmath-errno -fnew-alignment=8 -fno-cxx-exceptions -fno-slp-vectorize -fno-vectorize -disable-free -disable-llvm-verifier -DJPEGXL_ENABLE_SKCMS=1 -DJPEGXL_BUNDLE_SKCMS=1 -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -std=c++11 -MD -MT lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_frame.cc.o -MF lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_frame.cc.o.d -c -matomics -mbulk-memory /forge/libjxl/lib/jxl/enc_frame.cc -o lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_frame.cc.o' failed (returned 1) [141/444] Building CXX object lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o ninja: build stopped: subcommand failed. + retcode=1 emconfigure: error: './ci.sh release' failed (returned 1) ```
Compilation to wasm fails on `jxl/enc_aux_out.h`
https://api.github.com/repos/libjxl/libjxl/issues/2669/comments
2
2023-07-17T14:40:49Z
2024-07-19T12:12:37Z
https://github.com/libjxl/libjxl/issues/2669
1,807,940,416
2,669
[ "libjxl", "libjxl" ]
**Describe the bug** I transcoded JPEG images to JXL lossless with `cjxl input.jpg output.jxl --lossless_jpeg=1 -e 9 --brotli_effort=11` using JPEG XL encoder v0.8.2, and the converted JXL images don't contain the proper exif metadata. I can retrieve the exif by transcoding the images back to JPEG, so the exif metadata was stored somewhere in the JXL; however, it can not be directly accessed by exiftool. **To Reproduce** ``` dbtsai@Mac-mini % exiftool DSCF0170.jxl ExifTool Version Number : 12.60 File Name : DSCF0170.jxl Directory : . File Size : 2.5 MB File Modification Date/Time : 2023:07:11 02:19:07-07:00 File Access Date/Time : 2023:07:15 15:02:22-07:00 File Inode Change Date/Time : 2023:07:15 15:02:17-07:00 File Permissions : -rw-r--r-- File Type : JXL File Type Extension : jxl MIME Type : image/jxl Major Brand : JPEG XL Image (.JXL) Minor Version : 0.0.0 Compatible Brands : jxl ``` ``` dbtsai@Mac-mini % djxl DSCF0170.jxl DSCF0170.jpg JPEG XL decoder v0.8.2 0.8.2 [NEON] Read 2516883 compressed bytes. Reconstructed to JPEG. 2848 x 2136, 12.29 MP/s [12.29, 12.29], 6.25 MB/s [6.25, 6.25], 1 reps, 10 threads. dbtsai@Mac-mini % exiftool DSCF0170.jpg ExifTool Version Number : 12.60 File Name : DSCF0170.jpg Directory : . File Size : 3.1 MB File Modification Date/Time : 2023:07:15 15:04:46-07:00 File Access Date/Time : 2023:07:15 15:04:50-07:00 File Inode Change Date/Time : 2023:07:15 15:04:49-07:00 File Permissions : -rw-r--r-- File Type : JPEG File Type Extension : jpg MIME Type : image/jpeg Exif Byte Order : Little-endian (Intel, II) Make : FUJIFILM Camera Model Name : FinePix F31fd Orientation : Horizontal (normal) X Resolution : 72 Y Resolution : 72 Resolution Unit : inches Software : Digital Camera FinePix F31fd Ver1.00 Modify Date : 2007:07:08 19:06:28 Y Cb Cr Positioning : Co-sited Copyright : Exposure Time : 1/100 F Number : 5.0 Exposure Program : Program AE ``` **Expected behavior** Lossless transcoded JXL from JPG should contain proper exif metadata. **Environment** - OS: MacOSX Sonoma Public Beta - CPU type: ARM64 - cjxl/djxl version string: JPEG XL encoder v0.8.2 0.8.2 [NEON]
JPEG lossless transcoding resulting JXL images without exif metadata
https://api.github.com/repos/libjxl/libjxl/issues/2666/comments
14
2023-07-15T22:19:54Z
2023-08-01T07:19:01Z
https://github.com/libjxl/libjxl/issues/2666
1,806,352,643
2,666
[ "libjxl", "libjxl" ]
Support for y4m file format in `cjxl` was added in #25 and removed in #614. If I understand correctly, #837 added the missing already downsampled input option to the libjxl API so maybe #25 could be brought back?
Support y4m input in cjxl
https://api.github.com/repos/libjxl/libjxl/issues/2663/comments
3
2023-07-13T08:50:12Z
2023-08-02T07:40:54Z
https://github.com/libjxl/libjxl/issues/2663
1,802,522,907
2,663
[ "libjxl", "libjxl" ]
**Describe the bug** Hello, I'm testing my new fuzzer and find several memory issues in cjpegli and djxl. **Environment** - OS: Ubuntu 20.04.5 LTS - Compiler version: gcc 9.4.0 - CPU type: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz - cjxl/djxl version string: latest commit eda5654fd1c51c7285e1b1472161bb9e560e919f **To Reproduce** ``` export CC="gcc -fsanitize=address -g" export CXX="g++ -fsanitize=address -g" mkdir build && pushd build && \ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=no -DJPEGXL_ENABLE_FUZZERS=no -DBUILD_TESTING=OFF .. && cmake --build . -- -j$(nproc) && \ popd ``` ### BUG0 ``` ./tools/djxl /poc/djxl/poc0.JxlDecoderGetBasicInfo test.png JPEG XL decoder v0.9.0 eda5654f [AVX2,SSE4,SSE2] ================================================================= ==3917716==ERROR: AddressSanitizer: stack-use-after-scope on address 0x5654f01d1540 at pc 0x5654ef256f4a bp 0x7ffcce6b9ec0 sp 0x7ffcce6b9eb0 READ of size 4 at 0x5654f01d1540 thread T0 #0 0x5654ef256f49 in FixedAspectRatios /benchmark/libjxl/lib/jxl/headers.cc:37 #1 0x5654ef256f49 in jxl::SizeHeader::xsize() const /benchmark/libjxl/lib/jxl/headers.cc:53 #2 0x5654ef256f49 in jxl::SizeHeader::xsize() const /benchmark/libjxl/lib/jxl/headers.cc:51 #3 0x5654ef1f6a66 in JxlDecoderGetBasicInfo /benchmark/libjxl/lib/jxl/decode.cc:2083 #4 0x5654f0036cae 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> >*) /benchmark/libjxl/lib/extras/dec/jxl.cc:284 #5 0x5654ef100e5f in DecompressJxlToPackedPixelFile /benchmark/libjxl/tools/djxl_main.cc:317 #6 0x5654ef100e5f in main /benchmark/libjxl/tools/djxl_main.cc:468 #7 0x7f16b2172082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) #8 0x5654ef10910d in _start (/benchmark/libjxl/build/tools/djxl+0x4710d) 0x5654f01d1540 is located 0 bytes inside of global variable 'kRatios' defined in '/benchmark/libjxl/lib/jxl/headers.cc:30:22' (0x5654f01d1540) of size 56 SUMMARY: AddressSanitizer: stack-use-after-scope /benchmark/libjxl/lib/jxl/headers.cc:37 in FixedAspectRatios Shadow bytes around the buggy address: 0x0acb1e032250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0acb1e032260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0acb1e032270: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0acb1e032280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0acb1e032290: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0acb1e0322a0: 00 00 00 00 00 00 00 00[f8]f8 f8 f8 f8 f8 f8 f9 0x0acb1e0322b0: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00 0x0acb1e0322c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0acb1e0322d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0acb1e0322e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0acb1e0322f0: 00 00 00 00 00 00 00 00 00 00 00 00 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 ==3917716==ABORTING ``` ### BUG1 ``` ./tools/cjpegli /poc/cjpegli/poc0.Illegal test.jpg Illegal instruction gdb report (gdb) bt #0 jxl::Abort () at /benchmark/libjxl/lib/jxl/base/status.h:144 #1 0x000055d728f028d4 in jxl::extras::(anonymous namespace)::InMemoryIStream::readMemoryMapped (n=<optimized out>, this=0x7ffc9034e080) at /benchmark/libjxl/lib/extras/dec/exr.cc:42 #2 jxl::extras::(anonymous namespace)::InMemoryIStream::read (this=0x7ffc9034e080, c=0x611000000040 '\276' <repeats 200 times>..., n=<optimized out>) at /benchmark/libjxl/lib/extras/dec/exr.cc:49 #3 0x00007f10cdb3732e in Imf_2_3::Header::readFrom(Imf_2_3::IStream&, int&) () from /lib/x86_64-linux-gnu/libIlmImf-2_3.so.24 #4 0x00007f10cdb3f534 in Imf_2_3::InputFile::InputFile(Imf_2_3::IStream&, int) () from /lib/x86_64-linux-gnu/libIlmImf-2_3.so.24 #5 0x00007f10cdb46a10 in Imf_2_3::RgbaInputFile::RgbaInputFile(Imf_2_3::IStream&, int) () from /lib/x86_64-linux-gnu/libIlmImf-2_3.so.24 #6 0x000055d728f37e5f in jxl::extras::DecodeImageEXR (bytes=..., color_hints=..., ppf=<optimized out>, constraints=<optimized out>) at /benchmark/libjxl/lib/extras/dec/exr.cc:84 #7 0x000055d728f23e8c in jxl::extras::<lambda()>::operator() (__closure=0x7ffc9034eb00) at /benchmark/libjxl/lib/extras/dec/decode.cc:134 #8 jxl::extras::DecodeBytes (bytes=..., color_hints=..., ppf=<optimized out>, constraints=<optimized out>, orig_codec=<optimized out>) at /benchmark/libjxl/lib/extras/dec/decode.cc:140 #9 0x000055d728f0af83 in jpegxl::tools::(anonymous namespace)::CJpegliMain (argc=<optimized out>, argv=<optimized out>) at /benchmark/libjxl/lib/jxl/base/span.h:23 #10 0x00007f10cd50f083 in __libc_start_main (main=0x55d728f05140 <main(int, char const**)>, argc=3, argv=0x7ffc9034f9f8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc9034f9e8) at ../csu/libc-start.c:308 #11 0x000055d728f07b5e in _start () at /benchmark/libjxl/tools/cjpegli.cc:269 ``` ### BUG2 ``` ./tools/cjpegli /poc/cjpegli/poc1.assert.Iex_2_3.InputExc test.jpg terminate called after throwing an instance of 'Iex_2_3::InputExc' what(): Error reading pixel data from image file "". Unexpected tile y coordinate. Aborted gdb report (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007f6b2ce00859 in __GI_abort () at abort.c:79 #2 0x00007f6b2d1d8911 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6 #3 0x00007f6b2d1e438c in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6 #4 0x00007f6b2d1e43f7 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6 #5 0x00007f6b2d1e46fd in __cxa_rethrow () from /lib/x86_64-linux-gnu/libstdc++.so.6 #6 0x00007f6b2d4122ba in ?? () from /lib/x86_64-linux-gnu/libIlmImf-2_3.so.24 #7 0x00007f6b2d4644ef in Imf_2_3::TiledInputFile::readTiles(int, int, int, int, int) () from /lib/x86_64-linux-gnu/libIlmImf-2_3.so.24 #8 0x00007f6b2d430f06 in Imf_2_3::InputFile::readPixels(int, int) () from /lib/x86_64-linux-gnu/libIlmImf-2_3.so.24 #9 0x000055f67e979de9 in jxl::extras::DecodeImageEXR (bytes=..., color_hints=..., ppf=<optimized out>, constraints=<optimized out>) at /benchmark/libjxl/lib/extras/dec/exr.cc:145 #10 0x000055f67e964e8c in jxl::extras::<lambda()>::operator() (__closure=0x7ffcbf749630) at /benchmark/libjxl/lib/extras/dec/decode.cc:134 #11 jxl::extras::DecodeBytes (bytes=..., color_hints=..., ppf=<optimized out>, constraints=<optimized out>, orig_codec=<optimized out>) at /benchmark/libjxl/lib/extras/dec/decode.cc:140 #12 0x000055f67e94bf83 in jpegxl::tools::(anonymous namespace)::CJpegliMain (argc=<optimized out>, argv=<optimized out>) at /benchmark/libjxl/lib/jxl/base/span.h:23 #13 0x00007f6b2ce02083 in __libc_start_main (main=0x55f67e946140 <main(int, char const**)>, argc=3, argv=0x7ffcbf74a528, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcbf74a518) at ../csu/libc-start.c:308 #14 0x000055f67e948b5e in _start () at /benchmark/libjxl/tools/cjpegli.cc:269 ``` ### BUG3 ``` ./tools/cjpegli /poc/cjpegli/poc2.DecodeImageAPNG.oom test.jpg ================================================================= ==956867==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0xc306c00c00 bytes #0 0x7f9d3550c808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144 #1 0x562c1ae53a0e in jxl::extras::PackedImage::PackedImage(unsigned long, unsigned long, JxlPixelFormat const&, unsigned long) /benchmark/libjxl/lib/extras/packed_image.h:85 #2 0x562c1ae53a0e in jxl::extras::PackedImage::PackedImage(unsigned long, unsigned long, JxlPixelFormat const&) /benchmark/libjxl/lib/extras/packed_image.h:34 #3 0x562c1ae53a0e in jxl::extras::DecodeImageAPNG(jxl::Span<unsigned char const>, jxl::extras::ColorHints const&, jxl::extras::PackedPixelFile*, jxl::SizeConstraints const*) /benchmark/libjxl/lib/extras/dec/apng.cc:668 #4 0x562c1ae4a25f in operator() /benchmark/libjxl/lib/extras/dec/decode.cc:113 #5 0x562c1ae4a25f in jxl::extras::DecodeBytes(jxl::Span<unsigned char const>, jxl::extras::ColorHints const&, jxl::extras::PackedPixelFile*, jxl::SizeConstraints const*, jxl::extras::Codec*) /benchmark/libjxl/lib/extras/dec/decode.cc:140 #6 0x562c1ae31f82 in CJpegliMain /benchmark/libjxl/tools/cjpegli.cc:211 #7 0x7f9d34a71082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) ==956867==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144 in __interceptor_malloc ==956867==ABORTING ``` ### BUG4 ``` ./tools/cjpegli /poc/cjpegli/poc3.DecodeImageEXR.oom test.jpg ================================================================= ==1346138==ERROR: AddressSanitizer: requested allocation size 0x384600024c000006 (0x384600024c001008 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0x10000000000 (thread T0) #0 0x7fae37066808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144 #1 0x55c3809601fd in jxl::extras::PackedImage::PackedImage(unsigned long, unsigned long, JxlPixelFormat const&, unsigned long) /benchmark/libjxl/lib/extras/packed_image.h:85 #2 0x55c3809601fd in jxl::extras::PackedImage::PackedImage(unsigned long, unsigned long, JxlPixelFormat const&) /benchmark/libjxl/lib/extras/packed_image.h:34 #3 0x55c3809601fd in jxl::extras::PackedFrame::PackedFrame<int&, int&, JxlPixelFormat const&>(int&, int&, JxlPixelFormat const&) /benchmark/libjxl/lib/extras/packed_image.h:106 #4 0x55c3809601fd in void __gnu_cxx::new_allocator<jxl::extras::PackedFrame>::construct<jxl::extras::PackedFrame, int&, int&, JxlPixelFormat const&>(jxl::extras::PackedFrame*, int&, int&, JxlPixelFormat const&) /usr/include/c++/9/ext/new_allocator.h:146 #5 0x55c3809601fd in void std::allocator_traits<std::allocator<jxl::extras::PackedFrame> >::construct<jxl::extras::PackedFrame, int&, int&, JxlPixelFormat const&>(std::allocator<jxl::extras::PackedFrame>&, jxl::extras::PackedFrame*, int&, int&, JxlPixelFormat const&) /usr/include/c++/9/bits/alloc_traits.h:483 #6 0x55c3809601fd in void std::vector<jxl::extras::PackedFrame, std::allocator<jxl::extras::PackedFrame> >::_M_realloc_insert<int&, int&, JxlPixelFormat const&>(__gnu_cxx::__normal_iterator<jxl::extras::PackedFrame*, std::vector<jxl::extras::PackedFrame, std::allocator<jxl::extras::PackedFrame> > >, int&, int&, JxlPixelFormat const&) /usr/include/c++/9/bits/vector.tcc:449 #7 0x55c3809619d3 in void std::vector<jxl::extras::PackedFrame, std::allocator<jxl::extras::PackedFrame> >::emplace_back<int&, int&, JxlPixelFormat const&>(int&, int&, JxlPixelFormat const&) /usr/include/c++/9/bits/vector.tcc:121 #8 0x55c3809619d3 in void std::vector<jxl::extras::PackedFrame, std::allocator<jxl::extras::PackedFrame> >::emplace_back<int&, int&, JxlPixelFormat const&>(int&, int&, JxlPixelFormat const&) /usr/include/c++/9/bits/vector.tcc:109 #9 0x55c38095e5f4 in jxl::extras::DecodeImageEXR(jxl::Span<unsigned char const>, jxl::extras::ColorHints const&, jxl::extras::PackedPixelFile*, jxl::SizeConstraints const*) /benchmark/libjxl/lib/extras/dec/exr.cc:124 #10 0x55c380949e8b in operator() /benchmark/libjxl/lib/extras/dec/decode.cc:134 #11 0x55c380949e8b in jxl::extras::DecodeBytes(jxl::Span<unsigned char const>, jxl::extras::ColorHints const&, jxl::extras::PackedPixelFile*, jxl::SizeConstraints const*, jxl::extras::Codec*) /benchmark/libjxl/lib/extras/dec/decode.cc:140 #12 0x55c380930f82 in CJpegliMain /benchmark/libjxl/tools/cjpegli.cc:211 #13 0x7fae365cb082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) ==1346138==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: allocation-size-too-big ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144 in __interceptor_malloc ==1346138==ABORTING ``` ### POC [poc.zip](https://github.com/libjxl/libjxl/files/12034868/poc.zip)
several memory bugs in cjpegli and djxl
https://api.github.com/repos/libjxl/libjxl/issues/2661/comments
2
2023-07-13T02:49:37Z
2023-12-06T09:39:32Z
https://github.com/libjxl/libjxl/issues/2661
1,802,051,739
2,661
[ "libjxl", "libjxl" ]
**Describe the bug** Take a large input image, like: 6000x4000 pixels, PPM RGB and convert to JXL. The 32-bit cjxl.exe will crash, no crash with 64-bit version. The crash happens in: "FindTextLikePatches" (enc_patch_dictionary.cc). **To Reproduce** cjxl.exe test.ppm test.jxl **Expected behavior** Convert image to JXL. **Environment** - OS: Windows 10 - cjxl/djxl version string: 0.82, official release, 32 bit version. **Additional context** The crash (probably) happens in: "FindTextLikePatches" (enc_patch_dictionary.cc). <!-- 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 report in 32 bit mode (cjxl.exe)
https://api.github.com/repos/libjxl/libjxl/issues/2647/comments
2
2023-07-10T11:35:15Z
2025-01-23T20:44:01Z
https://github.com/libjxl/libjxl/issues/2647
1,796,570,416
2,647
[ "libjxl", "libjxl" ]
**Describe the bug** Documentation states following: ``` --container=0|1 0 = Do not encode using container format (strip Exif/XMP/JPEG bitstream reconstruction data). 1 = Force using container format. Default: use only if needed. ``` Implying that this parameter is a tristate: "container when needed" (absent parameter), "force raw stream" (0), "force container" (1). Actual behavior is: "container when needed" (0), "force container" (1). **To Reproduce** Steps to reproduce the behavior: 1) Get PNG with EXIF/XMP metadata 2) Try to convert it to jxl with `cjxl -d 0 --container=0 file.png file.jxl` 3) See that CLI writes "Encoding [Container | Modular" instead of "Encoding [Modular" **Expected behavior** Being able to use parameter like described in documentation **Screenshots** N/A **Environment** - OS: Windows - Compiler version: ??? - CPU type: x86_64 - cjxl/djxl version string: `cjxl v0.9.0 c3a4f9c [AVX2,SSE4,SSSE3,SSE2]` **Additional context** Message from MSLP: > looks like a bug > you cat't force container off in presence of exif et. al. - it needs to be changed in 2 places: > https://github.com/libjxl/libjxl/blob/main/tools/cjxl_main.cc#L989 > https://github.com/libjxl/libjxl/blob/main/lib/extras/enc/jxl.cc#L66
Can't disable container in cjxl via "--container=0" parameter
https://api.github.com/repos/libjxl/libjxl/issues/2645/comments
2
2023-07-09T04:05:48Z
2024-02-06T12:19:31Z
https://github.com/libjxl/libjxl/issues/2645
1,795,224,107
2,645
[ "libjxl", "libjxl" ]
I've been surprised by cjxl silently losing metadata on compression a few times now. Last, it silently seems to have lost stable diffusion metadata placed in png by the "automatic1111" webui. In the interest of least surprise and avoiding unintentional data loss, cjxl ideally should have the general safeguard of warning and producing a nonzero exit status if there is any additional data it can not sensibly encode into jxl. Instead have a CLI --flag to override this warning and accept loss of unknown/metadata as long as the standard image data seems to be encoded normally.
cjxl - nonzero exit and warn in the case there is any additional data it can not sensibly encode
https://api.github.com/repos/libjxl/libjxl/issues/2641/comments
15
2023-07-07T05:47:46Z
2025-06-03T09:52:01Z
https://github.com/libjxl/libjxl/issues/2641
1,792,830,782
2,641
[ "libjxl", "libjxl" ]
I wanted to open this in the discussion tab, but it's not activated on the repo. This isn't a bug, just a thought I wanted to share. A lot of image manipulation libraries (Ruby, Python, Node, etc) uses libvips to process images. Conversion, resize, blur and a ton of other image operations. Libvips is a great library overall, and have good JPEG-XL support. But as a maintainer of a large library, it may be hard for them to know all the ins and outs of each image format. Since libvips is using libjxl for it's image operations, maybe it would be a good idea to just review the code they have for interacting with libjxl, and see if there are any obvious missing features, or opportunities for them to e.g. use the libjxl APIs that may may not be aware of. From the point of view of the broader ecosystems adoption of JXL, most will actually only use libjxl indirectly, via tools such as libvips. So by spending some effort on making sure those downstream tools have what they need from libjxl, and have implemented it correctly, we can increase the adoption of JPEG-XL as an image format, and libjxl as a library. For example, libvips has some [memory issues with large files](https://github.com/libvips/libvips/issues/3132), and would benefit from a streaming API in libjxl. Maybe there are benefits to discussing what would constitute a good streaming API, from their point of view as a consumer. Just a thought I wanted to share. Feel free to close when you've read it :)
Collaboration with libvips
https://api.github.com/repos/libjxl/libjxl/issues/2640/comments
25
2023-07-06T20:06:12Z
2025-03-01T18:17:12Z
https://github.com/libjxl/libjxl/issues/2640
1,792,159,730
2,640
[ "libjxl", "libjxl" ]
encode a case with 32 bytes icc error case, it report error & core dump. ./cjxl /failedILSVRC2012/ILSVRC2012_val_00011735.JPEG 1.jxl JPEG XL encoder v0.9.0 689da0fd [AVX3,AVX2,SSE4,SSSE3,SSE2] Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0). Encoding [Container | JPEG, lossless transcode, effort: 7 | JPEG reconstruction data] ./lib/jxl/enc_color_management.cc:946: JXL_FAILURE: ICC file too small Illegal instruction (core dumped) ![ILSVRC2012_val_00011735](https://github.com/libjxl/libjxl/assets/13427649/f84bbfaf-701c-49e1-8f4f-e272e49b9fc9)
with very shot icc failed case, it should not core dump.
https://api.github.com/repos/libjxl/libjxl/issues/2638/comments
2
2023-07-06T10:26:56Z
2025-01-23T20:51:00Z
https://github.com/libjxl/libjxl/issues/2638
1,791,269,007
2,638
[ "libjxl", "libjxl" ]
is the --num_threads really working? It's alway using only one core. ![image](https://github.com/libjxl/libjxl/assets/100340496/88739644-5777-4df7-8457-f009879f543f)
num_threads
https://api.github.com/repos/libjxl/libjxl/issues/2631/comments
2
2023-07-03T17:23:26Z
2023-07-05T02:46:40Z
https://github.com/libjxl/libjxl/issues/2631
1,786,563,262
2,631
[ "libjxl", "libjxl" ]
**Describe the bug** [Decode Progressive example](https://github.com/libjxl/libjxl/blob/190d44fbe463c5c3081081c80633639f69478d97/examples/decode_progressive.cc#L156-L161) does the following: ```cpp std::vector<uint8_t> pixels; // .... pixels.resize(xsize * ysize * 4); void* pixels_buffer = (void*)pixels.data(); size_t pixels_buffer_size = pixels.size() * sizeof(float); if (JXL_DEC_SUCCESS != JxlDecoderSetImageOutBuffer(dec.get(), &format, pixels_buffer, pixels_buffer_size)) { ``` It creates a buffer of size in bytes `xsize * ysize * 4`, but then it tells JxlDecoderSetImageOutBuffer that the buffer's size is `xsize * ysize * 4 * 4`. That is just wrong. **To Reproduce** N/A **Expected behavior** The proper size should be used. **Screenshots** N/A **Environment** - OS: Any - Compiler version: Any - CPU type: Any - cjxl/djxl version string: N/A **Additional context** N/A
Example decode_progressive contains code that could lead to buffer overflow
https://api.github.com/repos/libjxl/libjxl/issues/2628/comments
0
2023-07-02T03:55:17Z
2023-07-06T06:48:17Z
https://github.com/libjxl/libjxl/issues/2628
1,784,426,379
2,628
[ "libjxl", "libjxl" ]
Btrfs has a compression feature—on my system it saves me (using zstd at level 3) ≈15GB on a 50GB root / partition. I was thinking, why couldn't JPEG XL be used in the Linux kernel in much the same way, for JPEG and PNG images? It's fully transparent for both.
Idea: libjxl in the Linux kernel
https://api.github.com/repos/libjxl/libjxl/issues/2624/comments
17
2023-06-30T06:50:13Z
2025-03-01T18:14:01Z
https://github.com/libjxl/libjxl/issues/2624
1,781,995,443
2,624
[ "libjxl", "libjxl" ]
Hi, has anyone tried to build and test using mac OS (m1 chip Ventura 13.3) ? I have tried building the lib previously but had some issues with the versions of third party dependencies. I was using docker before but still was not able to build due to some issues and now in the latest version, docker support has been removed I'm assuming. I've also tried the steps mentioned in the BUILDING_OSX.md but still no luck. My goal is to do some local changes and test them on my machine. Any help would be appreciated :) The following are examples of the kinds of errors I'm getting. (I haven't modified any files yet and did a fresh pull as well) ``` error: use of undeclared identifier 'JxlEncoderSetExtraChannelDistance'; did you mean 'JxlEncoderSetExtraChannelInfo'? JXL_ENC_SUCCESS != JxlEncoderSetExtraChannelDistance( ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JxlEncoderSetExtraChannelInfo /opt/homebrew/include/jxl/encode.h:912:29: note: 'JxlEncoderSetExtraChannelInfo' declared here JXL_EXPORT JxlEncoderStatus JxlEncoderSetExtraChannelInfo( ``` ``` error: cannot initialize a parameter of type 'JxlEncoder *' (aka 'JxlEncoderStruct *') with an lvalue of type 'JxlEncoderFrameSettings *' (aka 'JxlEncoderFrameSettingsStruct *') settings, 0, params.alpha_distance)) { ^~~~~~~~ /opt/homebrew/include/jxl/encode.h:52:16: note: 'JxlEncoderFrameSettingsStruct' is not defined, but forward declared here; conversion would be valid if it was derived from 'JxlEncoderStruct' typedef struct JxlEncoderFrameSettingsStruct JxlEncoderFrameSettings; ^ /opt/homebrew/include/jxl/encode.h:913:17: note: passing argument to parameter 'enc' here JxlEncoder* enc, size_t index, const JxlExtraChannelInfo* info); ``` ^
Issues with building and testing in mac OS.
https://api.github.com/repos/libjxl/libjxl/issues/2605/comments
9
2023-06-26T17:36:08Z
2024-12-01T10:52:52Z
https://github.com/libjxl/libjxl/issues/2605
1,775,260,025
2,605
[ "libjxl", "libjxl" ]
It used to build fine before a recent commit. Now libjxl can no longer be built to use with ffmpeg. https://github.com/m-ab-s/media-autobuild_suite/issues/2466 Cheers. ``` ├ Compiling FFmpeg with Vapoursynth R61 ├ FFmpeg will need vapoursynth.dll and vsscript.dll to run using vapoursynth demuxers! Running git update for ffmpeg... ┌ ffmpeg git ............................................ [Updates found] ├ Changing options to comply to nonfree... CUDA_PATH environment variable not set or directory does not exist. ├ Compiling static FFmpeg... ├ Running configure... ├ Running make... Likely error (tail of the failed operation logfile): C:/MABS/local64/include/jxl/decode.h:723:50: note: expected 'JxlColorProfileTarget' but argument is of type 'JxlPixelFormat *' 723 | const JxlDecoder* dec, JxlColorProfileTarget target, | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~ src/libavcodec/libjxldec.c:261:20: error: too many arguments to function 'JxlDecoderGetColorAsEncodedProfile' 261 | jret = JxlDecoderGetColorAsEncodedProfile(ctx->decoder, &ctx->jxl_pixfmt, JXL_COLOR_PROFILE_TARGET_DATA, &jxl_color); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:/MABS/local64/include/jxl/decode.h:722:29: note: declared here 722 | JXL_EXPORT JxlDecoderStatus JxlDecoderGetColorAsEncodedProfile( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make: *** [/build/ffmpeg-git/ffbuild/common.mak:81: libavcodec/libjxldec.o] Error 1 make failed. Check C:/MABS/build/ffmpeg-git/build-static-64bit/ab-suite.make.log This is required for other packages, so this script will exit. Creating diagnostics file... ```
a recent commit breaks it building with MABS (build system for FFmpeg)
https://api.github.com/repos/libjxl/libjxl/issues/2602/comments
3
2023-06-24T10:22:23Z
2023-07-02T15:53:14Z
https://github.com/libjxl/libjxl/issues/2602
1,772,594,391
2,602
[ "libjxl", "libjxl" ]
Since libjxl moved to GitHub, https://gitlab.com/wg1/jpeg-xl serves as a mirror. However, today I noticed that the latest commit on main branch there is 8ae78ac6, which was authored 4 months ago. I would like to know whether this is a technical issue, or developers have stopped mirroring commits on GitLab.
GitLab's wg1/jpeg-xl is not mirroring recent commits, out-of-date for several months
https://api.github.com/repos/libjxl/libjxl/issues/2599/comments
2
2023-06-23T00:41:54Z
2023-08-02T11:12:30Z
https://github.com/libjxl/libjxl/issues/2599
1,770,570,091
2,599
[ "libjxl", "libjxl" ]
The current wasm_demo (tools/wasm_demo/jxl_decompressor.cc) is using WrapPixelsToPng for encoding pixels to png. Is this a substitute for the actual PNGEncoder because the resulted files are extremely large in size. I want to re-implement it with JPEGEncoder instead, but I'm having trouble linking. I'll really appreciate if anyone can help. I have looked into past commits and use the commit where the wasm-demo used a png decoder instead of WrapPixelsToPng as a reference; I still couldn't build successfully! Here's my code for jxl_decompressor.cc: ` #include "lib/extras/dec/jxl.h" #include "lib/extras/enc/encode.h" #include "lib/extras/enc/jpg.h" ... DecompressorOutput* jxlDecompress(const uint8_t* input, size_t input_size) { ... if (!jxl::extras::DecodeImageJXL(input, input_size, dparams, nullptr, &ppf)) { return report_error(1, "failed to decode jxl"); } std::unique_ptr<jxl::extras::Encoder> encoder = jxl::extras::GetJPEGEncoder(); jxl::extras::EncodedImage encoded_image; if (!encoder->Encode(ppf, &encoded_image)) { return report_error(2, "failed to encode png"); } self->output.size = encoded_image.bitstreams[0].size(); self->output.data = encoded_image.bitstreams[0].data(); return self->output; } ` The error log kinda looks like this, the full log is attached at the end: ` [8/249] Building CXX object lib/CMakeFiles/input_suspension_test.dir/jpegli/test_utils.cc.o FAILED: lib/CMakeFiles/input_suspension_test.dir/jpegli/test_utils.cc.o /home/phunp/emsdk/upstream/emscripten/em++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DHWY_STATIC_DEFINE -DTEST_DATA_PATH=\"/home/phunp/libjxl/testdata\" -DTOOLCHAIN_MISS_SYS_AUXV_H -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I../ -I../third_party/highway -I../lib/include -Ilib/include -isystem ../third_party/googletest/googlemock/include -isystem ../third_party/googletest/googlemock -isystem ../third_party/googletest/googletest/include -isystem ../third_party/googletest/googletest -msimd128 -pthread -fno-rtti -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O3 -DNDEBUG -O2 -fmacro-prefix-map=/home/phunp/libjxl=. -Wno-builtin-macro-redefined -Wall -Werror -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -Wdeprecated-increment-bool -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wgnu-redeclared-enum -Winfinite-recursion -Wliteral-conversion -Wno-c++98-compat -Wno-unused-command-line-argument -Wprivate-header -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety-analysis -Wundefined-func-template -Wunreachable-code -Wunused-comparison -fsized-deallocation -fno-exceptions -fmath-errno -fnew-alignment=8 -fno-cxx-exceptions -fno-slp-vectorize -fno-vectorize -disable-free -disable-llvm-verifier -DJPEGXL_ENABLE_SKCMS=1 -DJPEGXL_BUNDLE_SKCMS=1 -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -std=c++11 -MD -MT lib/CMakeFiles/input_suspension_test.dir/jpegli/test_utils.cc.o -MF lib/CMakeFiles/input_suspension_test.dir/jpegli/test_utils.cc.o.d -o lib/CMakeFiles/input_suspension_test.dir/jpegli/test_utils.cc.o -c ../lib/jpegli/test_utils.cc ../lib/jpegli/test_utils.cc:487:40: error: assigning to 'boolean' from incompatible type 'const int' 487 | cinfo->write_JFIF_header = jparams.override_JFIF; | ~~~~~~~~^~~~~~~~~~~~~ ../lib/jpegli/test_utils.cc:490:41: error: assigning to 'boolean' from incompatible type 'const int' 490 | cinfo->write_Adobe_marker = jparams.override_Adobe; | ~~~~~~~~^~~~~~~~~~~~~~ ../lib/jpegli/test_utils.cc:521:9: error: no matching function for call to 'jpegli_add_quant_table' 521 | jpegli_add_quant_table(cinfo, table.slot_idx, &table.basic_table[0], | ^~~~~~~~~~~~~~~~~~~~~~ ../lib/jpegli/encode.h:63:6: note: candidate function not viable: no known conversion from 'const bool' to 'boolean' for 5th argument 63 | void jpegli_add_quant_table(j_compress_ptr cinfo, int which_tbl, | ^ ../lib/jpegli/test_utils.cc:538:3: error: no matching function for call to 'jpegli_enable_adaptive_quantization' 538 | jpegli_enable_adaptive_quantization(cinfo, jparams.use_adaptive_quantization); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../lib/jpegli/encode.h:146:6: note: candidate function not viable: no known conversion from 'const bool' to 'boolean' for 2nd argument 146 | void jpegli_enable_adaptive_quantization(j_compress_ptr cinfo, boolean value); | ^ ../lib/jpegli/test_utils.cc:547:24: error: assigning to 'boolean' from incompatible type 'bool' 547 | cinfo->raw_data_in = !input.raw_data.empty(); | ^~~~~~~~~~~~~~~~~~~~~~~ ../lib/jpegli/test_utils.cc:564:5: error: no matching function for call to 'jpegli_start_compress' 564 | jpegli_start_compress(cinfo, write_all_tables); | ^~~~~~~~~~~~~~~~~~~~~ ../lib/jpegli/encode.h:89:6: note: candidate function not viable: no known conversion from 'bool' to 'boolean' for 2nd argument 89 | void jpegli_start_compress(j_compress_ptr cinfo, boolean write_all_tables); | ^ ../lib/jpegli/test_utils.cc:630:44: error: cannot initialize a parameter of type 'boolean' with an rvalue of type 'bool' 630 | comptr, coef_arrays[c], by, 1, true); | ^~~~ ../lib/jpegli/test_utils.cc:723:39: error: assigning to 'boolean' from incompatible type 'const bool' 723 | cinfo->do_block_smoothing = dparams.do_block_smoothing; | ~~~~~~~~^~~~~~~~~~~~~~~~~~ ../lib/jpegli/test_utils.cc:724:40: error: assigning to 'boolean' from incompatible type 'const bool' 724 | cinfo->do_fancy_upsampling = dparams.do_fancy_upsampling; | ~~~~~~~~^~~~~~~~~~~~~~~~~~~ ../lib/jpegli/test_utils.cc:736:36: error: assigning to 'boolean' from incompatible type 'const bool' 736 | cinfo->quantize_colors = dparams.quantize_colors; | ~~~~~~~~^~~~~~~~~~~~~~~ ../lib/jpegli/test_utils.cc:930:5: error: use of undeclared identifier 'jpeg_crop_scanline'; did you mean 'jpegli_crop_scanline'? 930 | jpeg_crop_scanline(cinfo, &xoffset, &xsize_cropped); | ^~~~~~~~~~~~~~~~~~ | jpegli_crop_scanline ` [error_logs.txt](https://github.com/libjxl/libjxl/files/11832769/error_logs.txt)
Trouble linking wasm_demo with jpeg encoder
https://api.github.com/repos/libjxl/libjxl/issues/2595/comments
5
2023-06-22T10:10:57Z
2023-07-31T09:10:28Z
https://github.com/libjxl/libjxl/issues/2595
1,769,371,217
2,595
[ "libjxl", "libjxl" ]
**Describe the bug** ~~Consider the conformance sample `animation_icos4d.jxl`. (Here, for convenience: [https://buzo.us/H.jxl](https://buzo.us/H.jxl)). Attempting to losslessly recompress it using `cjxl -d 0` appears to be taking the 8-bit pixel data from the original and encoding it losslessly as 32-bit float, which inflates the file size pretty dramatically.~~ Fixed by #2591 although the next issue remains, at the moment: It also seems to be embedding an ICC profile rather than tagging the new file with an sRGB enum, despite the original being tagged with an sRGB enum. **To Reproduce** ``` $ cjxl -d 0 animation_icos4d.jxl test.jxl $ jxlinfo -v animation_icos4.jxl $ jxlinfo -v test.jxl ``` **Expected behavior** I expected cjxl to preserve the tagged enum space rather than synthesize an ICC profile and then embed the synthesized profile. **Log** [https://buzo.us/D.log](https://buzo.us/D.log) **Environment** - OS: Arch Linux x86_64 - Compiler version: GCC 13 - cjxl/djxl version string: JPEG XL encoder v0.9.0 00935aaa [AVX2]
Losslessly recompressing JXL turns enum tags into ICC profiles
https://api.github.com/repos/libjxl/libjxl/issues/2581/comments
4
2023-06-18T20:35:04Z
2023-07-06T09:05:38Z
https://github.com/libjxl/libjxl/issues/2581
1,762,449,545
2,581
[ "libjxl", "libjxl" ]
**Steps to reproduce** Do something that will trigger an error, for example: 1. `cjxl -v -v -v CMYK.jpg out.jxl` (attempting to do lossless JPEG transcode on a CMYK JPEG) 2. #2542 **Actual result** The user gets the following error messages: ``` JxlEncoderAddJPEGFrame() failed. EncodeImageJXL() failed. ``` **Expected result** More verbose and useful messages. In the case of 1., the user should be informed that lossless JPEG transcode on a CMYK JPEG is not supported. In the case of 2., the program should output as many debug / trace messages as possible, so that the user can submit them when opening issues. **Additional information** In the case of mpv, [they have a parameter which controls the verbosity level](https://mpv.io/manual/master/#options-msg-level). For libjxl, the help says `-v` can be repeated, but does not tell us what we get for each additional `-v`, not to mention that `-v` does not help users get more debugging messages.
Utilities do not output useful debug and error messages, even with multiple `-v` arguments
https://api.github.com/repos/libjxl/libjxl/issues/2580/comments
2
2023-06-17T15:08:33Z
2024-04-22T09:49:01Z
https://github.com/libjxl/libjxl/issues/2580
1,761,889,135
2,580
[ "libjxl", "libjxl" ]
**Describe the bug** Consider a PNG image that has an alpha channel. Attempting to encode to encode it with cjpegli fails with `jpegli encoding failed` and no obvious reason why. **To Reproduce** Take a PNG with an alpha channel, such as this one: [https://buzo.us/7F.png](https://buzo.us/7F.png) **Expected behavior** The alpha channel is entirely max value, i.e. the image is actually opaque. Which means I expect one of three things to happen: (1) cjpegli should just strip the alpha channel if it's entirely opaque, when encoding from PNG -> JPEG. This will happen, say, if you save a screenshot in Windows with the snipping tool, or use the above image. (2) cjpegli should refuse to encode it (current behavior) but it should print an error message like "Failed to encode input image because it has an alpha channel." So a user isn't left wondering ?????? (3) Add a `--strip_alpha` option to cjpegli, which causes it to ignore the alpha channel of the input, if present. In my personal opinion, the ideal default would be for `--strip_alpha` to be enabled if the input contains an alpha channel which is perfectly constant and fully opaque, and to refuse to strip it in any other scenario. Perhaps even with a message like "Implicitly stripping fully opaque alpha channel, set `--strip_alpha` to silence this message." An acceptable default would just be to refuse unless explicitly set. However, if set it would save users the trouble of running the image through optipng or other PNG palette reduction features that strip opaque alpha channels. Personally, I prefer (3) as a long-term solution but at the very least (2) should be implemented in the short-term. **Log** ``` $ cjpegli -v -v compass-alpha.png test.jpg Read 600x600 image, 48699 bytes. Encoding [YUV d1.000 AQ p2 OPT] jpegli encoding failed ``` **Environment** - OS: Arch Linux x86_64 - Compiler version: GCC 13 - cjxl/djxl version string: JPEG XL encoder v0.9.0 00935aaa [AVX2] **Additional context** cjpegli doesn't print its version string, I had to grab it from cjxl. But that's a separate issue.
cjpegli fails with nondescript error message if input PNG contains alpha
https://api.github.com/repos/libjxl/libjxl/issues/2579/comments
2
2023-06-17T14:38:50Z
2024-03-08T09:23:34Z
https://github.com/libjxl/libjxl/issues/2579
1,761,879,625
2,579
[ "libjxl", "libjxl" ]
I have been experimenting with wasm build from the JPEG XL viewer extension (https://chrome.google.com/webstore/detail/jpeg-xl-viewer/bkhdlfmkaenamnlbpdfplekldlnghchp) and many other wasm build of this lib. The performance recorded on browsers are worst. My 4K image always takes about 4 seconds to decode instead of like 1 seconds when decoding using djxl. I know wasm has some overhead included but 4 times worse is kind of weird. Does anyone else experience this? I'm also experiment using Chrome 104 with jxl flag enabled, and the speed, somehow, was even better than native djxl. I don't know how they achive this... Appreciate it if there're any explanation.
Wasm performance is much worse
https://api.github.com/repos/libjxl/libjxl/issues/2574/comments
14
2023-06-16T03:05:14Z
2023-08-02T08:36:28Z
https://github.com/libjxl/libjxl/issues/2574
1,759,846,351
2,574
[ "libjxl", "libjxl" ]
I’m looking everywhere on the internet and no one really talks about it. I think most would assume that reconstructing Jpeg would be much faster than decoding the whole thing and re-encoding it. I’m testing it using the latest cjxl release on my machine and having the pixel-to-jpeg flag turned on makes it run twice as fast.
Pixel-to-jpeg is faster than Jpeg reconstruction?
https://api.github.com/repos/libjxl/libjxl/issues/2572/comments
2
2023-06-15T19:07:28Z
2023-06-16T07:25:49Z
https://github.com/libjxl/libjxl/issues/2572
1,759,398,655
2,572
[ "libjxl", "libjxl" ]
**Describe the bug** The -p option (progressive) with jpg input files results in error and no image being put out, even when it is just on its own without any other options. But when input files are png images, then this option works fine. **To Reproduce** Steps to reproduce the behavior: run command: .\cjxl.exe ..\..\..\Pictures\BingImageOfTheDay_20210523.jpg .\result5.jxl -p **Expected behavior** Image is put out properly. **Screenshots** this is the test image that i used: ![BingImageOfTheDay_20210523](https://github.com/libjxl/libjxl/assets/61169664/98f00afc-0ea6-4bab-9de1-d12a5a0c40a7) **Environment** - OS: Windows 11 with all latest updates. - Compiler version: [e.g. clang 11.0.1] This software was downloaded as an x64 binary from the releases of this github repo. I did not compile it. - CPU type: amd ryzen 5900hs x64 CPU. - cjxl/djxl version string: JPEG XL encoder v0.8.1 c27d499 [AVX2,SSE4,SSSE3,Unknown] **Additional context** .\cjxl.exe .\BingImageOfTheDay_20210523.jpg .\result5.jxl -p -v The output (error?) message: JPEG XL encoder v0.8.1 c27d499 [AVX2,SSE4,SSSE3,Unknown] Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0). Read JPEG image with 345077 bytes. Encoding [Container | JPEG, lossless transcode, effort: 7 | JPEG reconstruction data], D:\a\libjxl\libjxl\lib\jxl\enc_frame.cc:908: JXL_CHECK: enc_state_->passes. Size() == 1 Maybe related to the problem: there is no D: drive mounted on my pc, and the error still occurs even when the jpg is in the same dir as the cjxl.exe executable. Kind regards. <!-- 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 -->
The -p option (progressive) with jpg input files results in error and no image being put out, even when it is just on its own without any other options.
https://api.github.com/repos/libjxl/libjxl/issues/2563/comments
3
2023-06-13T15:43:22Z
2023-06-23T10:17:25Z
https://github.com/libjxl/libjxl/issues/2563
1,755,188,771
2,563
[ "libjxl", "libjxl" ]
I'm having issues with cjxl not properly converting the ICC profiles of some JPEGs or may be all the viewers are displaying it wrong. I don't know which one of the two is the case. **Here's how to reproduce:** [source image](https://pbs.twimg.com/media/EvltOejWQAYc1Tk?format=jpg&name=4096x4096) with ICC profile `cjxl E:\Folder\EvltOejWQAYc1Tk.jpg E:\Folder\EvltOejWQAYc1Tk_80.jxl --lossless_jpeg=0 -q 80` result: https://github.com/libjxl/libjxl/assets/92237041/e15daf15-3dee-4407-b3a4-93cb893f4e4c Image viewer used to display = [JPEGView](https://github.com/sylikc/jpegview) Display result with [ImageGlass](https://github.com/d2phap/ImageGlass): ![5mgsxxYvYr](https://github.com/libjxl/libjxl/assets/92237041/6912f990-042a-4039-aee3-174460f909f2) Only [nomacs](https://github.com/nomacs/nomacs) is displaying the converted JXL properly which is weird because [nomacs](https://github.com/nomacs/nomacs) can't display JPG's ICC colors. ![zH40FxFDRT](https://github.com/libjxl/libjxl/assets/92237041/d0818c95-fea4-4c80-8c21-78842c74808b) Decoding the converted JXL back to JPG `--pixels_to_jpeg` destroys the colors Source image with ICC profile before converting to JXL: ![OpnhtLYWDu](https://github.com/libjxl/libjxl/assets/92237041/3bb5395b-66bc-46c6-99f5-d6b30550cfb7) JXL decoded back to JPG: ![b134uBd7Cn](https://github.com/libjxl/libjxl/assets/92237041/a4891bea-60d5-4fe6-b127-74fb29c7bbdc) OS = Windows10
cjxl not properly converting the ICC profiles of some JPGs or djxl not properly decoding the converted JXLs with ICC profile back to JPG
https://api.github.com/repos/libjxl/libjxl/issues/2550/comments
8
2023-06-09T16:12:12Z
2025-01-27T14:28:20Z
https://github.com/libjxl/libjxl/issues/2550
1,750,162,192
2,550
[ "libjxl", "libjxl" ]
**Describe the bug** ***SSIMULACRA2*** With images with alpha, `ssimulacra2_main` uses a custom logic https://github.com/libjxl/libjxl/blob/cf760b882e91bbc2f6ab59476e1315fc8db710fb/tools/ssimulacra2_main.cc#L72 while the API uses a differente one (https://github.com/libjxl/libjxl/blob/cf760b882e91bbc2f6ab59476e1315fc8db710fb/tools/ssimulacra2.cc#L491 value of 0.5 followed by a blend https://github.com/libjxl/libjxl/blob/cf760b882e91bbc2f6ab59476e1315fc8db710fb/tools/ssimulacra2.cc#L432). What is the correct behavior ? Shouldn't `ssimulacra2_main` just call `ComputeSSIMULACRA2` whatever the input? ***Butteraugli*** `butteraugli_main` uses a default intensity target of `80` (cf https://github.com/libjxl/libjxl/blob/cf760b882e91bbc2f6ab59476e1315fc8db710fb/tools/butteraugli_main.cc#L138) while the default value when creating the official wrapper at https://github.com/libjxl/libjxl/blob/cf760b882e91bbc2f6ab59476e1315fc8db710fb/lib/jxl/butteraugli_wrapper.cc#L72 is `255` (cf https://github.com/libjxl/libjxl/blob/cf760b882e91bbc2f6ab59476e1315fc8db710fb/lib/jxl/common.h#L70). Also, is there a way to get the Butteraugli distance like done in the internal API at https://github.com/libjxl/libjxl/blob/cf760b882e91bbc2f6ab59476e1315fc8db710fb/lib/jxl/enc_butteraugli_comparator.h#L46 but by using the official API in `include/jxl` ? The closest we have is https://github.com/libjxl/libjxl/blob/cf760b882e91bbc2f6ab59476e1315fc8db710fb/lib/include/jxl/butteraugli.h#L139
Different defaults for SSIMULACRA2 and Butteraugli between APIs and executables
https://api.github.com/repos/libjxl/libjxl/issues/2548/comments
5
2023-06-09T13:21:12Z
2024-01-18T07:14:49Z
https://github.com/libjxl/libjxl/issues/2548
1,749,891,859
2,548
[ "libjxl", "libjxl" ]
When I last tested in v0.6.1, the ICC profiles returned by `JxlDecoderGetColorAsICCProfile` did not use the CICP tag recently added to the ICC spec for files where `JxlDecoderGetColorAsEncodedProfile` returns CICP values. I'm guessing this is why the following comment shows up in the headers for v0.8.1: ``` * HDR color spaces such as those using PQ and HLG are also potentially * problematic, in that: while ICC profiles can encode a transfer function * that happens to approximate those of PQ and HLG (HLG for only one given * system gamma at a time, and necessitating a 3D LUT if gamma is to be * different from 1), they cannot (before ICCv4.4) semantically signal that * this is the color space that they represent. Therefore, they will * typically not actually be interpreted as representing an HDR color space. * This is especially detrimental to PQ which will then be interpreted as if * the maximum signal value represented SDR white instead of 10000 cd/m^2, * meaning that the image will be displayed two orders of magnitude (5-7 EV) * too dim. ``` While HDR metadata in ICC is still a bit in flux, it seems a good first step would be to at least make use of the CICP tag when appropriate.
libjxl should generate ICC profiles that use CICP tag when appropriate
https://api.github.com/repos/libjxl/libjxl/issues/2545/comments
3
2023-06-09T07:42:52Z
2023-06-09T11:31:56Z
https://github.com/libjxl/libjxl/issues/2545
1,749,321,983
2,545
[ "libjxl", "libjxl" ]
From `cdxl --help` output: > --resampling=-1|1|2|4|8 Resampling for extra channels. Default of -1 applies resampling only for low quality. Value 1 does no downsampling (1x1), 2 does 2x2 downsampling, 4 is for 4x4 downsampling, and 8 for 8x8 downsampling. So it should resample "extra channels". That does it mean "extra channels"? The result I get looks more like **all channels** are resampled. What is the purpose of such resampling if you always can just resize input image no arbitrary size (not only 0.5x 0.24x and 0.125x)? How can I get [chroma subsampling](https://en.wikipedia.org/wiki/Chroma_subsampling) for JPEG XL, like for other image formats, including JPEG itself? For example, here is a result with different `--resampling` values (converted back to jpeg for convenient): ![down 1x jxl](https://github.com/libjxl/libjxl/assets/128982/eb476c79-029f-4b23-a1cc-97d3483ee5b9) ![down 2x jxl](https://github.com/libjxl/libjxl/assets/128982/946bd57d-6379-465e-a4de-162ebc709ca1) ![down 4x jxl](https://github.com/libjxl/libjxl/assets/128982/bb419e7f-a004-4d9f-923c-acdbc40fe3df) ![down 8x jxl](https://github.com/libjxl/libjxl/assets/128982/fecab979-2cf9-4cf6-ae56-0bc02690d55f)
What exactly resampling does?
https://api.github.com/repos/libjxl/libjxl/issues/2544/comments
8
2023-06-08T18:40:26Z
2025-01-23T13:04:08Z
https://github.com/libjxl/libjxl/issues/2544
1,748,449,774
2,544
[ "libjxl", "libjxl" ]
I've tried current main branch and 0.8.1. In bot cases `cjxl --resampling=2` works about 8.5 times slower, than other values for this option. ``` # cjxl --resampling=1 ../down.png ../down.1x.jxl JPEG XL encoder v0.9.0 [NEON,NEON_WITHOUT_AES] Read 1218x1024 image, 703014 bytes, 86.6 MP/s Encoding [VarDCT, d1.000, effort: 7], Compressed to 71120 bytes (0.456 bpp). 1218 x 1024, 4.31 MP/s [4.31, 4.31], 1 reps, 4 threads. # cjxl --resampling=2 ../down.png ../down.2x.jxl JPEG XL encoder v0.9.0 [NEON,NEON_WITHOUT_AES] Read 1218x1024 image, 703014 bytes, 196.1 MP/s Encoding [VarDCT, d1.000, effort: 7], Compressed to 37487 bytes (0.240 bpp). 1218 x 1024, 0.51 MP/s [0.51, 0.51], 1 reps, 4 threads. # cjxl --resampling=4 ../down.png ../down.4x.jxl JPEG XL encoder v0.9.0 [NEON,NEON_WITHOUT_AES] Read 1218x1024 image, 703014 bytes, 196.3 MP/s Encoding [VarDCT, d1.000, effort: 7], Compressed to 14300 bytes (0.092 bpp). 1218 x 1024, 27.60 MP/s [27.60, 27.60], 1 reps, 4 threads. # cjxl --resampling=8 ../down.png ../down.8x.jxl JPEG XL encoder v0.9.0 [NEON,NEON_WITHOUT_AES] Read 1218x1024 image, 703014 bytes, 188.4 MP/s Encoding [VarDCT, d1.000, effort: 7], Compressed to 6308 bytes (0.040 bpp). 1218 x 1024, 39.04 MP/s [39.04, 39.04], 1 reps, 4 threads. ``` For perf record I get the following difference: ``` $ perf record cjxl --resampling=1 ../down.png ../down.1x.jxl # Overhead Command Shared Object Symbol # ........ ....... .................... ..................................................................................... # 12.01% cjxl libjxl.so.0.9.0 [.] jxl::FindBestPatchDictionary 8.12% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::EstimateEntropy 7.30% cjxl [kernel.kallsyms] [k] memchr_inv 6.96% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::FindBestMultiplier 4.88% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::TransformFromPixels 4.24% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DImpl<8ul, 4ul>::operator() 3.67% cjxl libjxl.so.0.9.0 [.] jxl::ThreadPool::RunCallState<jxl::Status (unsigned long), jxl::(anonymous namesp 3.63% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DImpl<16ul, 4ul>::operator() 3.54% cjxl [kernel.kallsyms] [k] memset 2.77% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DImpl<32ul, 4ul>::operator() 2.16% cjxl [kernel.kallsyms] [k] preempt_count_sub 1.34% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DWrapper<16ul, 0ul, jxl::N_NEON::(anonymo 1.34% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DWrapper<8ul, 4ul, jxl::N_NEON::(anonymou 1.25% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DImpl<64ul, 4ul>::operator() 1.17% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DWrapper<4ul, 4ul, jxl::N_NEON::(anonymou 1.08% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::AdaptiveQuantizationMap(float, jxl::Image3<fl 1.08% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DWrapper<32ul, 0ul, jxl::N_NEON::(anonymo 1.08% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DWrapper<8ul, 0ul, jxl::N_NEON::(anonymou 0.95% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::Symmetric5(jxl::Plane<float> const&, jxl::RectT<unsigned long> const 0.91% cjxl [kernel.kallsyms] [k] el0_da 0.91% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::AdjustQuantBlockAC 0.82% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DWrapper<4ul, 0ul, jxl::N_NEON::(anonymou 0.78% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DWrapper<64ul, 0ul, jxl::N_NEON::(anonymo 0.69% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::ProcessTile ``` ``` $ perf record cjxl --resampling=2 ../down.png ../down.1x.jxl # Overhead Command Shared Object Symbol # ........ ....... ....................... .................................................................................. # 36.29% cjxl libjxl.so.0.9.0 [.] jxl::DefaultEncoderHeuristics::LossyFrameHeuristics 35.70% cjxl libjxl.so.0.9.0 [.] jxl::(anonymous namespace)::AntiUpsample 5.88% cjxl libjxl.so.0.9.0 [.] jxl::(anonymous namespace)::DownsampleImage2_Sharper 3.99% cjxl [kernel.kallsyms] [k] memchr_inv 2.62% cjxl libjxl.so.0.9.0 [.] jxl::ConvolutionWithTranspose 1.31% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::FuzzyErosion 1.30% cjxl [kernel.kallsyms] [k] memset 0.72% cjxl libjxl.so.0.9.0 [.] jxl::SubSample2x 0.70% cjxl [kernel.kallsyms] [k] preempt_count_sub 0.64% cjxl libjxl.so.0.9.0 [.] jxl::FindBestPatchDictionary 0.59% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::EstimateEntropy 0.47% cjxl libjxl.so.0.9.0 [.] jxl::(anonymous namespace)::CreateMask 0.39% cjxl libjxl.so.0.9.0 [.] jxl::DownsampleImage 0.38% cjxl [kernel.kallsyms] [k] __pi_clear_page 0.34% cjxl [kernel.kallsyms] [k] el0_da 0.33% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::FindBestMultiplier 0.30% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::SeparateFrequencies 0.28% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::ConvolveT<jxl::N_NEON::Separable5Strategy> 0.28% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::TransformFromPixels 0.27% cjxl libjxl.so.0.9.0 [.] jxl::LinComb<float> 0.24% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DImpl<8ul, 4ul>::operator() 0.23% cjxl libjxl.so.0.9.0 [.] jxl::ConvolveBorderColumn 0.22% cjxl [kernel.kallsyms] [k] __kern_my_cpu_offset 0.22% cjxl libjxl.so.0.9.0 [.] jxl::N_NEON::(anonymous namespace)::DCT1DImpl<16ul, 4ul>::operator() ``` It could be related to this PR: https://github.com/libjxl/libjxl/pull/471. As I can see, the performance drop in `E` (encoding?) column matches. **Environment** - OS: Linux - Compiler version: gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 - CPU type: aarch64 - cjxl/djxl version string: JPEG XL encoder v0.9.0 [NEON,NEON_WITHOUT_AES]
Compression with --resampling=2 dramattically slower than other values
https://api.github.com/repos/libjxl/libjxl/issues/2543/comments
1
2023-06-08T18:32:12Z
2025-05-22T17:29:05Z
https://github.com/libjxl/libjxl/issues/2543
1,748,439,526
2,543
[ "libjxl", "libjxl" ]
**Describe the bug** `cjxl` fails with `JxlEncoderAddJPEGFrame() failed` for some JPEG files. `Jpeginfo` reports the file as a valid JFIF file. Example of failing JPEG: <a href="https://coucou-treks-media.s3.fr-par.scw.cloud/56bce969-26ad-4d5f-ba25-83cdae2db7d6.jpg" target="_blank">image.jpg</a> **To Reproduce** ``` wget https://coucou-treks-media.s3.fr-par.scw.cloud/56bce969-26ad-4d5f-ba25-83cdae2db7d6.jpg jpeginfo -c 56bce969-26ad-4d5f-ba25-83cdae2db7d6.jpg cjxl 56bce969-26ad-4d5f-ba25-83cdae2db7d6.jpg out.jxl ``` Output: ``` 56bce969-26ad-4d5f-ba25-83cdae2db7d6.jpg 1200 x 1600 24bit P JFIF 311160 OK JPEG XL encoder v0.8.1 c27d4992 [AVX2,SSE4,SSSE3,Unknown] Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0). Read JPEG image with 311160 bytes. Encoding [Container | JPEG, lossless transcode, effort: 7 | JPEG reconstruction data], JxlEncoderAddJPEGFrame() failed. EncodeImageJXL() failed. ``` **Expected behavior** Jpeg is properly encoded to JPEG XL **Environment** - OS: Ubuntu 22.04 (WSL 2) - CPU type: x86_64 - cjxl/djxl version string: cjxl v0.8.1 c27d4992 [AVX2,SSE4,SSSE3,Unknown]
cjxl fails with "JxlEncoderAddJPEGFrame() failed" for a valid JFIF file
https://api.github.com/repos/libjxl/libjxl/issues/2542/comments
4
2023-06-08T16:47:45Z
2025-04-27T01:53:59Z
https://github.com/libjxl/libjxl/issues/2542
1,748,312,120
2,542
[ "libjxl", "libjxl" ]
**Describe the bug** When encoding a quite "big" (in term of width and height) GIF to lossy JXL, I get a core dumped error (Error Code 132). Command used: `cjxl -d 1 -e 8 in.gif out.jxl`. The error only happens with effort 8 and 9, while `cjxl` is working as expected with effort from 1 to 7. This is the complete error message: ``` $ cjxl -d 1 -e 8 1671398343573.gif out.jxl JPEG XL encoder v0.9.0 561baa06 [AVX2,SSE4,SSSE3,SSE2] Read 1280x720 image, 12372743 bytes, 10.3 MP/s Encoding [VarDCT, d1.000, effort: 8], ./lib/jxl/image.h:60: JXL_CHECK: xsize <= orig_xsize_ Illegal instruction (core dumped) ``` **To Reproduce** Steps to reproduce the behavior: - [Download the GIF](https://cdn.discordapp.com/attachments/673202643916816384/1114828631022247967/1671398343573.gif) (~12 MB) (ask for reupload on another platform, i don't know if people without discord account can download it). - Simply execute `cjxl -d 1 -e 8 1671398343573.gif outjxl` **Expected behavior** No error, output file written and works. **Environment** - OS: Linux (Arch) - Compiler version: Nighty builds - CPU type: x86_64 - cjxl/djxl version string: `JPEG XL encoder v0.9.0 561baa06 [AVX2,SSE4,SSSE3,SSE2]` **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 -->
"Illegal instruction (core dumped)" when encoding GIF to lossy JXL with effort 8 and 9
https://api.github.com/repos/libjxl/libjxl/issues/2539/comments
0
2023-06-07T18:14:22Z
2023-06-12T12:21:34Z
https://github.com/libjxl/libjxl/issues/2539
1,746,435,069
2,539
[ "libjxl", "libjxl" ]
**Describe the bug** Take a PNG image (any sRGB png will do) and run the following: ``` cjpegli input.png output.jpg ssimulacra2 input.png output.jpg ``` The `ssimulacra2` tool will report a score, but it will produce an extraneous error message "Failed to decode image" for seemingly no reason. The same is true about `butteraugli_main`. However, it's decoding the JPEG with the system libjpeg, not with djpegli/libjxl, and doesn't appear to say anything about that. **To Reproduce** ``` $ cjpegli shade.png shade.jpg Read 1100x1424 image, 1045774 bytes. Encoding [YUV d1.000 AQ p2 OPT] Compressed to 145430 bytes (0.743 bpp). 1100 x 1424, 55.42 MP/s [55.42, 55.42], 1 reps, 1 threads. $ ssimulacra2 shade.png shade.jpg Failed to decode image 83.66464705 $ djpegli shade.jpg distorted.png Read 145430 compressed bytes. 1100 x 1424, 51.58 MP/s [51.58, 51.58], 1 reps, 1 threads. $ ssimulacra2 shade.png distorted.png 85.61520873 $ /usr/bin/djpeg <shade.jpg >distorted.png $ ssimulacra2 shade.png distorted.png 83.66464705 ``` **Expected behavior** For JPEG input, when comparing ssimulacra2 scores, it should not produce an error message that it failed to decode the JPEG. Additionally, it should either: (1) Note that it's using system libjpeg, not djpegli/libjxl to decode the JPEG (2) Just use djpegli/libjxl to decode the jpeg, possibly with a note, maybe even configurable? **Environment** - OS: x86_64 Arch Linux - Compiler version: GCC 13.1.1 - cjxl/djxl version string: JPEG XL encoder v0.9.0 e35880c4 [AVX2] **Additional context** The choice of sRGB input PNG doesn't really matter, so I didn't attach a sample. I reproduced on every sRGB PNG I tried.
Tools report "Failed to decode image" for JPEG but still produces a score based on system libjpeg decoder
https://api.github.com/repos/libjxl/libjxl/issues/2524/comments
0
2023-06-04T15:38:42Z
2023-06-06T06:38:30Z
https://github.com/libjxl/libjxl/issues/2524
1,740,438,121
2,524
[ "libjxl", "libjxl" ]
I saw in the documentation that JxlPixelFormat supports BGR, but I didn't find the exact way to set it. Am I not finding the correct method, or is BGR not actually supported currently? Related issues: https://github.com/libjxl/libjxl/issues/993 --- Does anyone know the solution? I found that Window system pixel-related APIs almost always support only BGRA format (e.g. GdipCreateBitmapFromScan0()). If jxl doesn't support BGR, it's a huge waste to do a second conversion every time. And the current Window system is still the choice of most people, support for BGR is really necessary.
How to set JxlPixelFormat to BGR?
https://api.github.com/repos/libjxl/libjxl/issues/2519/comments
3
2023-06-02T08:36:53Z
2023-06-05T16:18:26Z
https://github.com/libjxl/libjxl/issues/2519
1,737,718,247
2,519
[ "libjxl", "libjxl" ]
**Describe the bug** Running `BUILD_TARGET=wasm32 ENABLE_WASM_SIMD=1 emconfigure ./ci.sh release` yields an error ``` CMake Error at third_party/CMakeLists.txt:36 (message): Highway library (hwy) not found. Install libhwy-dev or download it to third_party/highway from https://github.com/google/highway . Highway is required to build JPEG XL. You can run /root/libjxl/deps.sh to download this dependency. ``` however: `apt install libhwy-dev` ``` libhwy-dev is already the newest version (1.0.3-2). 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded. ``` **To Reproduce** follow the `wasm` build instructions **Expected behavior** Expected to have the `wasm` build ready **Screenshots** **Environment** - OS: Ubuntu 23.04 - CPU type: aarch64
Can't create `wasm` build
https://api.github.com/repos/libjxl/libjxl/issues/2513/comments
16
2023-05-31T01:18:56Z
2023-08-04T02:07:04Z
https://github.com/libjxl/libjxl/issues/2513
1,733,232,768
2,513
[ "libjxl", "libjxl" ]
**Describe the bug** During testing, several samples were found to cause consumption of all RAM. However, this did not cause memory corruption, except for one sample, which possibly caused a read outside of the allocated memory. **To Reproduce** Steps to reproduce the behavior: ```bash ./cjxl ./id_000010,src_002666_time_68141275_execs_10591653_op_flip32_pos_163 --disable_output ``` Output: ```bash ==13412== LEAK SUMMARY: ==13412== definitely lost: 0 bytes in 0 blocks ==13412== indirectly lost: 0 bytes in 0 blocks ==13412== possibly lost: 52,830,275,144 bytes in 41 blocks ==13412== still reachable: 25,776,811,852 bytes in 68,748 blocks ==13412== suppressed: 0 bytes in 0 blocks ==13412== ==13412== For lists of detected and suppressed errors, rerun with: -s ==13412== ERROR SUMMARY: 26 errors from 26 contexts (suppressed: 0 from 0) ``` **Expected behavior** At run util with current sample is expected сontrolled memory consumption **Screenshots** launch visualization to memory use: ![launch visualization](https://github.com/a-shvedov/pocs/blob/main/res/libjxl/2023_05_30/2023-05-30_21-57.png?raw=true "launch visualization") **Environment** - OS: ```tested at 5.15.78-2.el7.3.x86_64 (Centos based system)``` ; - Compiler version: ```clang version 12.0.1``` ; - CPU type: ```x86_64``` ; - cjxl version string: ```0.8.1``` **Additional context** The area causing the problem could probably be in lib/jxl/image.cc on line 94, where the JXL_CHECK() macro is used in bytes_.get() (probably problem is caused by the PlaneBase constructor). link to a sample (github-url): [id_000010_poc](https://github.com/a-shvedov/pocs/blob/main/res/libjxl/2023_05_30/id_000010%2Csrc_002666_time_68141275_execs_10591653_op_flip32_pos_163) link to a valgrind log (github-url): [/id_000010_valgind.log](https://github.com/a-shvedov/pocs/blob/main/res/libjxl/2023_05_30/id_000010_valgind.log) <!-- 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 -->
Memory leak issue in when converting JPEG via cjxl
https://api.github.com/repos/libjxl/libjxl/issues/2512/comments
2
2023-05-30T19:10:51Z
2023-09-19T12:57:21Z
https://github.com/libjxl/libjxl/issues/2512
1,732,827,594
2,512
[ "libjxl", "libjxl" ]
**Is your feature request related to a problem? Please describe.** JXL currently has support for animations, but I think we could improve the system, and finally give a real use to all those different format requests (also known as "ajxl / jxla format"). **Describe the solution you'd like** Support for independent multi-layer systems (i.e., you can store "galleries" with different images as [TIFF currently does](https://www.nightprogrammer.org/development/multipage-tiff-example-download-test-image-file/)). Useful for storing magazines, manga, books (I know we have OCR, but this is more for book scanning backups). Recommended storage format: CXL (Collection), GXL (Gallery), JXLC, JXLG, CJXL (may cause confusion with cjxl transcoder), GJXL. Output formats: Multiple files [jpg, png, hevc] or a TIFF collection. ![image](https://github.com/libjxl/libjxl/assets/42191299/706c1441-2035-4e1c-a7c5-02d6127c1f0e) ![image](https://github.com/libjxl/libjxl/assets/42191299/2892043a-fc66-48ad-b1f9-fb1c32bca2d7) ![image](https://github.com/libjxl/libjxl/assets/42191299/645912f9-3ab1-4a7c-9c6b-e131bcb5db8e) --- Multivariate image support (i.e. having one "base" image and multiple "patches" displayed on top of the base image). Useful for similar/similar images but with minimal changes, as well as for digital art that also has multiple variants (such as images stored in swf/html/psd/clip specifically to have multiple versions of an image, but without the need to have multiple copies of the same image taking up a lot of redundant space). Recommended format: JXL (since it is one image but with multiple variants), DXL (dynamic), IXL (Interactive), VXL (variable), DJXL, JXLD, IJXL, JXLI, VJXL, JXLV Output format: Multiple files [jpg, png, hevc] or a TIFF collection. _I don't have any "safe" example_ ![image](https://github.com/libjxl/libjxl/assets/42191299/fd4eb1e1-b180-4fb9-b9f2-90328d4af846) ![image](https://github.com/libjxl/libjxl/assets/42191299/bc6a4e49-afed-4d42-84a1-88772a77dc47) Remarks regarding this method. Because "deleting" duplicate segments and adding them on top of the base image modifies the original quality of the file, it could be considered a hybrid lossless/lossy file. Consider that the number of output files can be quite large, depending on the dimensionality (number of independent variants you have, as well as the number of dependent variants for each dependent and independent variant), so the command line should be adapted to exclude dependent or independent variants at the user's request, although by default and to save time, you could choose to simply export all variants. Also certain rules must be followed, for example that the variants must have a lower resolution than the base file (since they are patches that should modify the base, not the other way around, in case the variant is as big as the base, or even bigger, it would be better to use galleries). The patches are applied with a 1:1 ratio, to avoid pixel loss and should be placed with respect to the XY pixels of the base image and be fixed. Avoid infinite loops / size bombs by a maximum size of variant combinations (variant 1 * variant n should be a multiple of less than 1024 possible combinations for example). It should also follow an order in Z dimension to avoid graphical overlapping errors (commonly seen in video games as a noise in the texture when 2 layers collide). Unlike galleries, multiple variants should be modifiable from a separate floating window (work for image viewer developers), which can enable or disable each of the dependent variants (if an independent variant has more than 1 dependent variant, then a drop-down menu will be displayed, otherwise, simply a toggle will be displayed to enable or disable that independent variant). Also such variants can have support for names or colors (internally they would be represented with hexadecimal code, but for the user they would be shown as a colored dot). Colors cannot be combined with text. --- Consider more options for playback speed (This is aimed at image viewer developers). That is, have the possibility to increase or decrease the frame rate, even pause the gif, as well as have reverse playback (play from the end to the beginning, with its consequent reverse speed control). Recommended format: AXL (Animated), AJXL, JXLA Output format: GIF, AVIF, APNG. **Describe alternatives you've considered** Multilayer TIFF, Pdf with forms, Formats such as CBR, CBZ, etc. Formats such as PSD, Clip, Apng, SWF and Flipbook. **Additional context** Currently there is no official support for converting tiff to jxl (the closest is imagemagic, but this leaves out the other image conversion programs) and the support for jxl animations is somewhat basic and confusing for the user (Qimgv is the only windows program I found with stable support for jxl animations, when renaming jxl to ajxl, the program no longer recognized the file, it is a problem of the app, but here is the importance of standardization of formats). On second thought, you would also have to rewrite the way the command line is interacted with, e.g. `cjxl -t img "input" "output" "parameters"` where -t is type, with the possible options img for images anim for animations/ gifs col for collections or galleries dyn for variants / dynamic images If you do not add the "-t" command, you should use img or anim by default.
Expanding multilayer functionality
https://api.github.com/repos/libjxl/libjxl/issues/2510/comments
0
2023-05-30T04:04:34Z
2023-05-30T06:45:24Z
https://github.com/libjxl/libjxl/issues/2510
1,731,471,426
2,510
[ "libjxl", "libjxl" ]
**Describe the bug** Valgrind reports 167 MB as "possibly lost" when decoding with libjxl. It appears to be system-dependent: I can reproduce it on my desktop but not my laptop, with the same build number. **To Reproduce** ``` valgrind --leak-check=full djxl ./newton-cradle.jxl --disable_output ``` **Expected behavior** All Heap Blocks Are Free - No Leaks Are Possible **Environment** - OS: Arch Linux x86_64, Intel i7-6700K - Compiler version: GCC 13.1.1 - cjxl/djxl version string: JPEG XL decoder v0.9.0 c8a4a7aa [AVX2] **Additional context** Log file: https://buzo.us/n.log
Memory leak with djxl
https://api.github.com/repos/libjxl/libjxl/issues/2509/comments
5
2023-05-28T16:21:02Z
2023-05-31T14:39:26Z
https://github.com/libjxl/libjxl/issues/2509
1,729,551,272
2,509
[ "libjxl", "libjxl" ]
**Describe the bug** When I converted Facebook's emoji PNGs losslessly to JXL and WebP, I found that JXL outputs are larger than WebP outputs and even the source. (It seems that Facebook uses images instead of actual Unicode emojis in posts.) **To Reproduce** 1. Download test files, e.g.: * https://static.xx.fbcdn.net/images/emoji.php/v9/t80/1/16/1f92a.png * https://static.xx.fbcdn.net/images/emoji.php/v9/t6b/1/16/1f971.png * https://static.xx.fbcdn.net/images/emoji.php/v9/t25/1/16/1fae1.png 2. Convert them into lossless JXL using `cjxl -d 0` 3. Convert them into lossless WebP using `cwebp -lossless` 4. Observe that JXL always loses (source vs WebP vs JXL): * 579 / 528 / 748 * 586 / 564 / 711 * 586 / 548 / 696 **Environment** * Arch Linux x86_64 * `JPEG XL encoder v0.8.1 c27d4992 [AVX2,SSE4,SSSE3,Unknown]` * libwebp 1.3.0
For emojis, lossless JXL loses to lossless WebP, and even larger than the source
https://api.github.com/repos/libjxl/libjxl/issues/2508/comments
2
2023-05-27T06:12:46Z
2023-06-07T17:28:23Z
https://github.com/libjxl/libjxl/issues/2508
1,728,483,479
2,508
[ "libjxl", "libjxl" ]
**Is your feature request related to a problem? Please describe.** Would be great if the reference encoder could store the encoder parameters / command line arguments to the metadata of the output file, like some video encoders do. It could be useful both for knowing what kind of image you're dealing with, and to learn a thing or two about how others use the encoder. **Describe the solution you'd like** The reference encoder could write encoding parameters to metadata. If not by default, then at least optionally. **Describe alternatives you've considered** Tools using cjxl or other jpeg xl emcoders could write this to the metadata afterwards. **Additional context** Original idea found here: * https://www.reddit.com/r/jpegxl/comments/13s5ooq/how_to_view_encode_properties_of_a_jxl_image/jlob700
Store encoding parameters in metadata
https://api.github.com/repos/libjxl/libjxl/issues/2507/comments
3
2023-05-26T17:22:40Z
2023-07-27T12:25:50Z
https://github.com/libjxl/libjxl/issues/2507
1,727,985,792
2,507
[ "libjxl", "libjxl" ]
https://github.com/libjxl/libjxl/blob/26ffd2c9641faabd14a739250d8028b528b48a36/lib/jxl/butteraugli/butteraugli.cc#L129-L130
Typo: Profiler zone in butteraugli wrong
https://api.github.com/repos/libjxl/libjxl/issues/2504/comments
1
2023-05-25T19:56:28Z
2023-05-26T16:00:09Z
https://github.com/libjxl/libjxl/issues/2504
1,726,409,073
2,504
[ "libjxl", "libjxl" ]
Hi, I was following the documentation on how to develop using docker but was unable to run the "ci.sh" shell script through the container. `CMake Error at third_party/brotli/CMakeLists.txt:4 (cmake_minimum_required): CMake 3.10.4 or higher is required. You are running version 3.10.2` I am unable to update the CMake version in the docker container although, the CMake version installed in my system is much greater (3.26.4) I'm kind of new to this and I'm not sure if this issue is relevant to this repo but I would greatly appreciate any help. Thanks. (I have also tried running without docker but I'm using an M1 mac and was getting weird sorts of architecture errors)
Updating cmake version in docker image
https://api.github.com/repos/libjxl/libjxl/issues/2495/comments
1
2023-05-23T23:17:11Z
2023-05-24T11:01:59Z
https://github.com/libjxl/libjxl/issues/2495
1,722,923,892
2,495
[ "libjxl", "libjxl" ]
As table on jpegxl.info says jxl should have animation feature, but I cant figure out how to do it in best way by myself. I tried this: $ convert file.gif file.jxl online at https://mconverter.eu/convert/gif/jxl/ $ ffmpeg -i file.gif file.jxl cjxl file.gif file.jxl But all this ways make static image in mpv and in librewolf (built-in jpeg xl). As I see in jxlinfo images have there. May be jxllib now not included for support animation? If I done something wrong, I want to hear your version.
What is the best way to create animated jpegxl image?
https://api.github.com/repos/libjxl/libjxl/issues/2494/comments
3
2023-05-23T14:39:56Z
2024-04-17T08:43:30Z
https://github.com/libjxl/libjxl/issues/2494
1,722,223,008
2,494
[ "libjxl", "libjxl" ]
I don't know how to program, but I can write some simple scripts in AutoHotkey, a scripting language. I can call libwebp.dll to display a webp image in AutoHotkeyGUI, which will probably only use 3 libwebp-api. But when I was trying to use a similar approach, calling jxl.dll to display jxl images, I ran into difficulties. I don't know what process is needed to load jxl images, and the answers ChatGPT gives are almost always wrong. I'm asking for help, even if it's just to tell me the general process, like which functions must be called. That way in combination with ChatGPT's help I should be able to call jxl.dll correctly.
Non-programmer requesting help on how to call jxl.dll
https://api.github.com/repos/libjxl/libjxl/issues/2488/comments
0
2023-05-20T08:59:15Z
2023-06-01T21:36:58Z
https://github.com/libjxl/libjxl/issues/2488
1,718,107,232
2,488
[ "libjxl", "libjxl" ]
**Is your feature request related to a problem? Please describe.** Currently, libjxl's workflows run with write-all permissions. This is dangerous, since it opens the project up to supply-chain attacks. [GitHub itself](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-secrets) recommends ensuring all workflows run with minimal permissions. **Describe the solution you'd like** This issue can be solved in two ways: - add top-level read-only permissions to the workflows; and/or - set the default token permissions to read-only in the repo settings. I'll be sending a PR along with this issue that sets the top-level permissions. If you instead (or also) wish to modify the default token permissions: 1. Open the repo settings 2. Go to [Actions > General](https://github.com/libjxl/libjxl/settings/actions) 3. Under "Workflow permissions", set them to "Read repository contents and packages permissions" **Additional context** My name is Pedro and I work with Google and the [Open Source Security Foundation (OpenSSF)](https://www.openssf.org/) to improve the supply-chain security of the open-source ecosystem.
Set minimal workflow permissions
https://api.github.com/repos/libjxl/libjxl/issues/2484/comments
1
2023-05-18T21:53:19Z
2023-05-22T11:28:50Z
https://github.com/libjxl/libjxl/issues/2484
1,716,315,175
2,484
[ "libjxl", "libjxl" ]
**Describe the bug** Homebrew installation fails on macOS Catalina 10.15.7 **To Reproduce** Steps to reproduce the behavior: `brew install jpeg-xl` **Expected behavior** Installs properly. **Environment** Results of `brew config`: ``` HOMEBREW_VERSION: 4.0.18 ORIGIN: https://github.com/Homebrew/brew HEAD: b0dc84b117f54f6b18e0528b95477c54e409ebdd Last commit: 6 days ago Core tap origin: https://github.com/Homebrew/homebrew-core Core tap HEAD: d1c7a086f1ab6e53e1b9bdce88939c7eaa8a77e4 Core tap last commit: 54 minutes ago Core tap branch: master HOMEBREW_PREFIX: /usr/local HOMEBREW_CASK_OPTS: [] HOMEBREW_MAKE_JOBS: 8 HOMEBREW_NO_INSTALL_FROM_API: set Homebrew Ruby: 2.6.10 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.10_1/bin/ruby CPU: octa-core 64-bit kabylake Clang: 11.0.3 build 1103 Git: 2.37.3 => /usr/local/bin/git Curl: 7.64.1 => /usr/bin/curl macOS: 10.15.7-x86_64 CLT: 12.4.0.0.1.1610135815 Xcode: 11.6 ``` **Additional context** ``` Last 15 lines from /Users/xxxx/Library/Logs/Homebrew/jpeg-xl/02.cmake: cd /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=8 -DJPEGXL_PATCH_VERSION=1 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1 -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/include -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib/include -fno-rtti -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O3 -DNDEBUG -O2 -std=c++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -Wdeprecated-increment-bool -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wgnu-redeclared-enum -Winfinite-recursion -Wliteral-conversion -Wno-c++98-compat -Wno-unused-command-line-argument -Wprivate-header -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety-analysis -Wundefined-func-template -Wunreachable-code -Wunused-comparison -fsized-deallocation -fno-exceptions -fmath-errno -fnew-alignment=8 -fno-cxx-exceptions -fno-slp-vectorize -fno-vectorize -disable-free -disable-llvm-verifier -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -MD -MT lib/CMakeFiles/jxl_dec-obj.dir/jxl/splines.cc.o -MF CMakeFiles/jxl_dec-obj.dir/jxl/splines.cc.o.d -o CMakeFiles/jxl_dec-obj.dir/jxl/splines.cc.o -c /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/jxl/splines.cc [ 57%] Building CXX object lib/CMakeFiles/jxl_dec-obj.dir/jxl/toc.cc.o cd /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=8 -DJPEGXL_PATCH_VERSION=1 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1 -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/include -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib/include -fno-rtti -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O3 -DNDEBUG -O2 -std=c++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -Wdeprecated-increment-bool -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wgnu-redeclared-enum -Winfinite-recursion -Wliteral-conversion -Wno-c++98-compat -Wno-unused-command-line-argument -Wprivate-header -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety-analysis -Wundefined-func-template -Wunreachable-code -Wunused-comparison -fsized-deallocation -fno-exceptions -fmath-errno -fnew-alignment=8 -fno-cxx-exceptions -fno-slp-vectorize -fno-vectorize -disable-free -disable-llvm-verifier -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -MD -MT lib/CMakeFiles/jxl_dec-obj.dir/jxl/toc.cc.o -MF CMakeFiles/jxl_dec-obj.dir/jxl/toc.cc.o.d -o CMakeFiles/jxl_dec-obj.dir/jxl/toc.cc.o -c /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/jxl/toc.cc [ 58%] Building CXX object lib/CMakeFiles/jxl_dec-obj.dir/jxl/decode_to_jpeg.cc.o cd /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=8 -DJPEGXL_PATCH_VERSION=1 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1 -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/include -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib/include -fno-rtti -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O3 -DNDEBUG -O2 -std=c++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -Wdeprecated-increment-bool -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wgnu-redeclared-enum -Winfinite-recursion -Wliteral-conversion -Wno-c++98-compat -Wno-unused-command-line-argument -Wprivate-header -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety-analysis -Wundefined-func-template -Wunreachable-code -Wunused-comparison -fsized-deallocation -fno-exceptions -fmath-errno -fnew-alignment=8 -fno-cxx-exceptions -fno-slp-vectorize -fno-vectorize -disable-free -disable-llvm-verifier -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -MD -MT lib/CMakeFiles/jxl_dec-obj.dir/jxl/decode_to_jpeg.cc.o -MF CMakeFiles/jxl_dec-obj.dir/jxl/decode_to_jpeg.cc.o.d -o CMakeFiles/jxl_dec-obj.dir/jxl/decode_to_jpeg.cc.o -c /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/jxl/decode_to_jpeg.cc [ 58%] Building CXX object lib/CMakeFiles/jxl_dec-obj.dir/jxl/box_content_decoder.cc.o cd /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=8 -DJPEGXL_PATCH_VERSION=1 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1 -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/include -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib/include -fno-rtti -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O3 -DNDEBUG -O2 -std=c++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -Wdeprecated-increment-bool -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wgnu-redeclared-enum -Winfinite-recursion -Wliteral-conversion -Wno-c++98-compat -Wno-unused-command-line-argument -Wprivate-header -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety-analysis -Wundefined-func-template -Wunreachable-code -Wunused-comparison -fsized-deallocation -fno-exceptions -fmath-errno -fnew-alignment=8 -fno-cxx-exceptions -fno-slp-vectorize -fno-vectorize -disable-free -disable-llvm-verifier -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -MD -MT lib/CMakeFiles/jxl_dec-obj.dir/jxl/box_content_decoder.cc.o -MF CMakeFiles/jxl_dec-obj.dir/jxl/box_content_decoder.cc.o.d -o CMakeFiles/jxl_dec-obj.dir/jxl/box_content_decoder.cc.o -c /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/jxl/box_content_decoder.cc [ 58%] Building CXX object lib/CMakeFiles/jxl_dec-obj.dir/jxl/jpeg/dec_jpeg_data.cc.o cd /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=8 -DJPEGXL_PATCH_VERSION=1 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1 -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/include -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib/include -fno-rtti -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O3 -DNDEBUG -O2 -std=c++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -Wdeprecated-increment-bool -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wgnu-redeclared-enum -Winfinite-recursion -Wliteral-conversion -Wno-c++98-compat -Wno-unused-command-line-argument -Wprivate-header -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety-analysis -Wundefined-func-template -Wunreachable-code -Wunused-comparison -fsized-deallocation -fno-exceptions -fmath-errno -fnew-alignment=8 -fno-cxx-exceptions -fno-slp-vectorize -fno-vectorize -disable-free -disable-llvm-verifier -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -MD -MT lib/CMakeFiles/jxl_dec-obj.dir/jxl/jpeg/dec_jpeg_data.cc.o -MF CMakeFiles/jxl_dec-obj.dir/jxl/jpeg/dec_jpeg_data.cc.o.d -o CMakeFiles/jxl_dec-obj.dir/jxl/jpeg/dec_jpeg_data.cc.o -c /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/jxl/jpeg/dec_jpeg_data.cc [ 60%] Building CXX object lib/CMakeFiles/jxl_dec-obj.dir/jxl/jpeg/dec_jpeg_data_writer.cc.o cd /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=8 -DJPEGXL_PATCH_VERSION=1 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1 -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/include -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib/include -fno-rtti -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O3 -DNDEBUG -O2 -std=c++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -Wdeprecated-increment-bool -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wgnu-redeclared-enum -Winfinite-recursion -Wliteral-conversion -Wno-c++98-compat -Wno-unused-command-line-argument -Wprivate-header -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety-analysis -Wundefined-func-template -Wunreachable-code -Wunused-comparison -fsized-deallocation -fno-exceptions -fmath-errno -fnew-alignment=8 -fno-cxx-exceptions -fno-slp-vectorize -fno-vectorize -disable-free -disable-llvm-verifier -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -MD -MT lib/CMakeFiles/jxl_dec-obj.dir/jxl/jpeg/dec_jpeg_data_writer.cc.o -MF CMakeFiles/jxl_dec-obj.dir/jxl/jpeg/dec_jpeg_data_writer.cc.o.d -o CMakeFiles/jxl_dec-obj.dir/jxl/jpeg/dec_jpeg_data_writer.cc.o -c /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/jxl/jpeg/dec_jpeg_data_writer.cc [ 60%] Building CXX object lib/CMakeFiles/jxl_dec-obj.dir/jxl/jpeg/jpeg_data.cc.o cd /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=8 -DJPEGXL_PATCH_VERSION=1 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1 -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/include -I/tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/build/lib/include -fno-rtti -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O3 -DNDEBUG -O2 -std=c++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -Wdeprecated-increment-bool -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wgnu-redeclared-enum -Winfinite-recursion -Wliteral-conversion -Wno-c++98-compat -Wno-unused-command-line-argument -Wprivate-header -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety-analysis -Wundefined-func-template -Wunreachable-code -Wunused-comparison -fsized-deallocation -fno-exceptions -fmath-errno -fnew-alignment=8 -fno-cxx-exceptions -fno-slp-vectorize -fno-vectorize -disable-free -disable-llvm-verifier -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -MD -MT lib/CMakeFiles/jxl_dec-obj.dir/jxl/jpeg/jpeg_data.cc.o -MF CMakeFiles/jxl_dec-obj.dir/jxl/jpeg/jpeg_data.cc.o.d -o CMakeFiles/jxl_dec-obj.dir/jxl/jpeg/jpeg_data.cc.o -c /tmp/jpeg-xl-20230518-30714-1avw7x1/libjxl-0.8.1/lib/jxl/jpeg/jpeg_data.cc [ 60%] Built target jxl_dec-obj make: *** [all] Error 2 ```
brew install jpeg-xl fails on macOS Catalina, blocking several php version installs
https://api.github.com/repos/libjxl/libjxl/issues/2483/comments
7
2023-05-18T18:15:54Z
2024-01-11T14:22:47Z
https://github.com/libjxl/libjxl/issues/2483
1,716,064,438
2,483
[ "libjxl", "libjxl" ]
**Is your feature request related to a problem? Please describe.** I just found when trying to export a high-res file exports slowly and minimal CPU is used. **Describe the solution you'd like** Are you able to make this GIMP plug-in Multi-Threaded, to take advantage of modern CPUs? Thank You for considering! **Additional context** Windows 10 Pro, on Intel Core i7 8700 3.2GHz 6 Cores, 12 Threads
GIMP JXL Plug-in is not Multi-threaded
https://api.github.com/repos/libjxl/libjxl/issues/2476/comments
1
2023-05-12T15:01:48Z
2025-01-19T21:33:42Z
https://github.com/libjxl/libjxl/issues/2476
1,707,788,290
2,476
[ "libjxl", "libjxl" ]
**Describe the bug** When trying to decode (with coalescing) a layered JXL image that's encoded losslessly, an error sometimes occured: ``` lib\jxl\render_pipeline\stage_blending.cc:40: JXL_FAILURE: Trying to blend XYB reference frame 0 and non-XYB frame lib\jxl\render_pipeline\render_pipeline.h:81: JXL_RETURN_IF_ERROR code=1: stage->IsInitialized() lib\jxl\dec_frame.cc:653: JXL_RETURN_IF_ERROR code=1: dec_state_->PreparePipeline(decoded_, pipeline_options) lib\jxl\decode.cc:1142: frame processing failed ``` However this only occurs when the image is encoded with effort 5 and up, and more interestingly, it only affect some part of the image. When the part is cropped, the error goes away. The error also didn't appear when coalescing is set to false. **To Reproduce** Steps to reproduce the behavior: A little bit hard to reproduce it perfectly since it's sporadic. - Encode a layered image losslessly with effort 5 or up, in my case I sent multiple `JxlEncoderAddImageFrame` with name set and each frame duration set to 0, just like the API suggests. - Decode that image with coalescing on / default, or djxl, or try to open it with other apps. **Expected behavior** Image decoded successfully. **Environment** - OS: Windows 10 - Compiler version: Clang 15 - CPU type: x86_64 - cjxl/djxl version string: 0.8.1 **Additional context** Since the errors are sporadic, I attached the following archive with affected JXL images (lossless effort 1-9, and lossy e7) along with the reference PNG: [jxl-layer-bug.zip](https://github.com/libjxl/libjxl/files/11415615/jxl-layer-bug.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 -->
Unable to decode with coalesce on some lossless layered JXL image
https://api.github.com/repos/libjxl/libjxl/issues/2463/comments
7
2023-05-07T17:32:05Z
2024-03-04T10:12:57Z
https://github.com/libjxl/libjxl/issues/2463
1,699,160,903
2,463
[ "libjxl", "libjxl" ]
brew install jpeg-xl ==> Upgrading jpeg-xl 0.6.1_1 -> 0.8.1_2 ==> cmake -S . -B build -DJPEGXL_FORCE_SYSTEM_BROTLI=ON -DJPEGXL_FORCE_SYSTEM_LCMS2=ON -DJPEGXL ==> cmake --build build Last 15 lines from /Users/studiosluka_3/Library/Logs/Homebrew/jpeg-xl/02.cmake: <stdin>:16089:2: error: instruction requires: AVX-512 ISA vfmadd132ps %zmm0, %zmm5, %zmm2 ^ <stdin>:16090:2: error: instruction requires: AVX-512 ISA vaddps %zmm2, %zmm3, %zmm0 ^ <stdin>:16091:2: error: instruction requires: AVX-512 ISA vfmadd132ps %zmm7, %zmm4, %zmm0 ^ <stdin>:16092:2: error: instruction requires: AVX-512 ISA vmovaps %zmm0, (%rbx,%rax) ^ make[2]: *** [lib/CMakeFiles/jxl_dec-obj.dir/jxl/convolve_separable5.cc.o] Error 1 make[1]: *** [lib/CMakeFiles/jxl_dec-obj.dir/all] Error 2 make: *** [all] Error 2 **Environment** - OS: MacOS 10.13.6 - Compiler version:cmake version 3.26.3 - CPU type: Intel Core 2 Duo - cjxl/djxl version string: [e.g. cjxl [v0.3.7 | SIMD supported: SSE4,Scalar]] **Additional context** Add any other context about the problem here.
MacOS brew install jpeg-xl error
https://api.github.com/repos/libjxl/libjxl/issues/2461/comments
34
2023-05-06T07:52:05Z
2024-09-05T19:12:15Z
https://github.com/libjxl/libjxl/issues/2461
1,698,522,943
2,461
[ "libjxl", "libjxl" ]
GDK Pixbuf is a building block for image handling on linux, a plug-in is provided directly and benefit from an updated version at each commit. WIC, the equivalent under windows could also be attached to this repo such as updated artifacts are generated for each release. I think it would ease the adoption for windows users. Two project already attempted to provide a WIC plug-in for jpeg XL: - https://github.com/mirillis/jpegxl-wic (last commit in February 2021) still point to the old jpeg XL gitlab repo, written in C++ - https://github.com/saschanaz/jxl-winthumb (last commit in June 2022) made in pure rust None of them seems easy to use or install 😅 It could be included in the main source tree, or hosted officially in the libjxl github but as a separate project.
provide a WIC plugin
https://api.github.com/repos/libjxl/libjxl/issues/2458/comments
2
2023-05-05T08:40:01Z
2023-05-05T09:44:24Z
https://github.com/libjxl/libjxl/issues/2458
1,697,234,049
2,458
[ "libjxl", "libjxl" ]
**Describe the bug** 16-bit RGB/RGBA images from inkscape are encoded without error, but incorrectly, in both *VarDCT* and *modular* modes **To Reproduce** ``` cjxl 16bit_rgba.png 16bit_rgba.jxl djxl 16bit_rgba.jxl preview.png ``` Expected: ![8bit_rgb](https://user-images.githubusercontent.com/69643766/236220926-08f2c88e-7076-47c2-a6bc-f3cdd11b8ce9.png) Encoded and then decoded 16bit_rgb.png: ![16bit_rgb](https://user-images.githubusercontent.com/69643766/236221972-a85457ae-4bbb-4d5c-b3ad-7f7a2da99b8f.png) Encoded and then decoded 16bit_rgba.png: ![16bit_rgba](https://user-images.githubusercontent.com/69643766/236222009-519ec55b-2bb6-4a24-ae32-4c1d1c2cac38.png) Sources (`8bit_rgb.png` `16bit_rgb.png` `16bit_rgba.png` `source.svg`): [sources.zip](https://github.com/libjxl/libjxl/files/11398038/sources.zip) **Environment** - OS: Linux - Compiler version: clang version 15.0.6 - CPU type: x86_64 - cjxl/djxl version string: `cjxl v0.9.0 6b1e5b0 [AVX2,SSE4,SSSE3,SSE2]` - inkscape version: `Inkscape 1.2.2` **Additional context** Related: https://old.reddit.com/r/jpegxl/comments/1328u57/a_particular_png_file_couldnt_be_converted/ imagemagick's `identify -verbose 16bit_rgba.png` output contains ``` Depth: 16/8-bit Channel depth: red: 8-bit green: 8-bit blue: 8-bit alpha: 1-bit ```
16bit PNG images from Inkscape are encoded wrongly
https://api.github.com/repos/libjxl/libjxl/issues/2457/comments
5
2023-05-04T13:46:41Z
2023-05-23T20:23:36Z
https://github.com/libjxl/libjxl/issues/2457
1,696,053,398
2,457
[ "libjxl", "libjxl" ]
**Describe the bug** See the attached JPEG XL file. It fails to load with GIMP, Eye of MATE, and ImageMagick. However, djxl, ffmpeg, and jxl-oxide all decode it correctly and report no errors. **To Reproduce** ``` djxl george-smile4.jxl test.png mpv george-smile4.jxl gimp george-smile4.jxl magick display george-smile4.jxl eom george-smile4.jxl ``` **Expected behavior** All libjxl-based decoders should decode the file correctly, as it is a valid file. **Screenshots** ![george-smile4 jxl](https://user-images.githubusercontent.com/1342577/236212659-2a2c005d-5190-4218-9b65-24ed6b1e2089.jpg) **Environment** - OS: Arch Linux x86_64 - Compiler version: GCC 12.2.1 - cjxl/djxl version string: JPEG XL decoder v0.9.0 6b1e5b03 [AVX2]
GDK Pixbuf and GIMP plugins fail to decode valid JXL file
https://api.github.com/repos/libjxl/libjxl/issues/2456/comments
3
2023-05-04T13:05:04Z
2023-05-09T15:59:13Z
https://github.com/libjxl/libjxl/issues/2456
1,695,974,794
2,456
[ "libjxl", "libjxl" ]
**Describe the bug** Conformance test `noise` looks different in the djxl version and doesn't match the `ref.png` **To Reproduce** ```bash cd "conformance/testcases/noise/" djxl input.jxl out.png ``` **Screenshots** Ref: ![ref](https://user-images.githubusercontent.com/69643766/235508979-b3006faa-c211-4495-a072-5385fee311e6.png) Djxl version: ![out](https://user-images.githubusercontent.com/69643766/235509059-be5bf896-aa75-4cc5-beb6-1c69f19cf74b.png) **Environment** - OS: Linux - Compiler version: clang version 15.0.6 - CPU type: x86_64 - cjxl/djxl version string: `djxl v0.9.0 5ef0a0c [AVX2,SSE4,SSSE3,SSE2]`
Noise synthesis doesn't match the conformance test reference
https://api.github.com/repos/libjxl/libjxl/issues/2447/comments
5
2023-05-01T18:46:37Z
2023-05-02T13:24:04Z
https://github.com/libjxl/libjxl/issues/2447
1,691,179,024
2,447
[ "libjxl", "libjxl" ]
Will there be some kind of stable, trustable version of libjxl available anytime soon? Right now, version 0.8.1 requires me to download at least the following _latest_ git versions of packages: - third_party/highway - third_party/sjpeg - third_party/skcms Completely unverifiable builds depending on freshly downloaded development versions of obscure packages hardly serve to accelerate the adoption of this library. Who wants to track down bugs and security issues if it's not even clear where they are coming from?
No stable, trustable version of libjxl
https://api.github.com/repos/libjxl/libjxl/issues/2439/comments
3
2023-04-27T18:22:05Z
2023-04-28T22:23:40Z
https://github.com/libjxl/libjxl/issues/2439
1,687,355,439
2,439
[ "libjxl", "libjxl" ]
**Describe the bug** Looks lik esomething is wrong with test suite or I'm doing something wrongl;y. On test suite exetion I have I have ~17% of failing units. **To Reproduce** cmake settings (`cmake -L` output): <details> ```console -- Cache values ASCIIDOC:FILEPATH=/usr/bin/a2x BASH_PROGRAM:FILEPATH=/usr/bin/bash BUILD_SHARED_LIBS:BOOL=ON BUILD_TESTING:BOOL=ON CMAKE_BUILD_TYPE:STRING=RelWithDebInfo CMAKE_INSTALL_PREFIX:PATH=/usr GMOCK_INCLUDE_DIR:PATH=/usr/include GTest_DIR:PATH=/usr/lib64/cmake/GTest JPEGXL_BUNDLE_LIBPNG:BOOL=OFF JPEGXL_BUNDLE_SKCMS:BOOL=ON JPEGXL_DEP_LICENSE_DIR:STRING= JPEGXL_ENABLE_BENCHMARK:BOOL=OFF JPEGXL_ENABLE_BOXES:BOOL=ON JPEGXL_ENABLE_COVERAGE:BOOL=OFF JPEGXL_ENABLE_DEVTOOLS:BOOL=ON JPEGXL_ENABLE_DOXYGEN:BOOL=ON JPEGXL_ENABLE_EXAMPLES:BOOL=ON JPEGXL_ENABLE_FUZZERS:BOOL= JPEGXL_ENABLE_JNI:BOOL=ON JPEGXL_ENABLE_JPEGLI:BOOL=ON JPEGXL_ENABLE_JPEGLI_LIBJPEG:BOOL=ON JPEGXL_ENABLE_MANPAGES:BOOL=ON JPEGXL_ENABLE_OPENEXR:BOOL=ON JPEGXL_ENABLE_PLUGINS:BOOL=OFF JPEGXL_ENABLE_PROFILER:BOOL=OFF JPEGXL_ENABLE_SIZELESS_VECTORS:BOOL=OFF JPEGXL_ENABLE_SJPEG:BOOL=OFF JPEGXL_ENABLE_SKCMS:BOOL=OFF JPEGXL_ENABLE_TCMALLOC:BOOL=ON JPEGXL_ENABLE_TOOLS:BOOL=ON JPEGXL_ENABLE_TRANSCODE_JPEG:BOOL=ON JPEGXL_ENABLE_VIEWERS:BOOL=OFF JPEGXL_FORCE_NEON:BOOL=false JPEGXL_FORCE_SYSTEM_BROTLI:BOOL=ON JPEGXL_FORCE_SYSTEM_GTEST:BOOL=ON JPEGXL_FORCE_SYSTEM_HWY:BOOL=ON JPEGXL_FORCE_SYSTEM_LCMS2:BOOL=ON JPEGXL_STATIC:BOOL=false JPEGXL_WARNINGS_AS_ERRORS:BOOL=OFF SPHINX_BUILD_PROGRAM:FILEPATH=SPHINX_BUILD_PROGRAM-NOTFOUND benchmark_DIR:PATH=benchmark_DIR-NOTFOUND ``` </details> **Expected behavior** Test suite should not fail. **Environment** - OS: Linux x86/64 - Compiler version: gcc 13.0.1 - CPU type: Intel(R) Xeon(R) Silver 4116 - cjxl/djxl version string: [e.g. cjxl [v0.3.7 | SIMD supported: SSE4,Scalar]] **Additional context** I'm not sure what more I can add 🤔
0.8.1: test suite is failing in ~17% of the test units
https://api.github.com/repos/libjxl/libjxl/issues/2433/comments
22
2023-04-26T22:44:29Z
2023-10-10T14:51:14Z
https://github.com/libjxl/libjxl/issues/2433
1,685,841,235
2,433
[ "libjxl", "libjxl" ]
**Is your feature request related to a problem? Please describe.** More and more applications get JXL writing support. Recently I asked the xfce4-screenshoter developer to include it and now that the gdk-pixbuf patch has support for saving JXL (thanks novomesk!), xfce4-screenshoter has a ready MR that will make it save in JXL. However, it will likely only use quality 100, thus multiple percent of space could be saved by using additional options. By comparing resulting JXL files, I found out that ksnip is likely using only quality 100 as well. **Describe the solution you'd like** An environment variable that users can use to define what parameters they actually want JXL saving applications to use. It should be mentioned in the README so that people will notice its existence. **Describe alternatives you've considered** Well, considering that many applications will use kimageformats or gdk-pixbuf and they might only pass some parameters to those, it might be possible to just intercept there somehow (aka making those to prefer whatever the user set via e.g. LIBJXL — or whatever the name of the env variable might be — at the risk that some useful option might not be passed anymore that the application wanted). **Additional context** https://gitlab.xfce.org/apps/xfce4-screenshooter/-/merge_requests/47#note_70113 You can find some comparisons with ksnip and cjxl in previous posts there.
Environment variable to tell applications what options to use for JXL saving
https://api.github.com/repos/libjxl/libjxl/issues/2417/comments
1
2023-04-23T12:35:30Z
2023-04-24T06:11:12Z
https://github.com/libjxl/libjxl/issues/2417
1,680,012,684
2,417
[ "libjxl", "libjxl" ]
**Is your feature request related to a problem? Please describe.** Currently there is no write support which holds back some applications from saving into JXL. Namely xfce4-screenshooter since I opened an issue there previously and got a comment that linked me to https://github.com/libjxl/libjxl/blob/main/plugins/gdk-pixbuf/pixbufloader-jxl.c#L567 in which it is stated that writing support is TODO. **Describe the solution you'd like** Make it possible to write JXL files when gdk-pixbuf is used. Doesn't matter that much how but it should be easy enough for other people to adopt it with minimal, if any, code changes necessary. **However, look at additional context part for something that might be wise to keep in mind.** **Describe alternatives you've considered** None. **Additional context** Comment from novomesk on the JXL Discord: > The write support for gdk-pixbuf plugin is not difficult. The loader needs SKCMS which is not packaged everywhere - that's also a blocker. Would be good to optionally use LCMS2. Loader loads all frames into memory. That's OK for normal animations but someone create large JXL with many frames, memory gets exhausted quickly. xfce4-screenshooter issue comment: https://gitlab.xfce.org/apps/xfce4-screenshooter/-/issues/108#note_69652
Write support for gdk-pixbuf plugin
https://api.github.com/repos/libjxl/libjxl/issues/2404/comments
1
2023-04-19T09:17:40Z
2023-04-21T08:14:14Z
https://github.com/libjxl/libjxl/issues/2404
1,674,512,287
2,404
[ "libjxl", "libjxl" ]
**Describe the bug** Most jxl art images are not decodable due to the very high `estimated_area_reached` value **To Reproduce** - `djxl art.jxl art.png` - Failed with JXL_FAILURE("Too large total_estimated_area_reached") |variable| value| |-|-| | manhattan_distance | 200 | | width_estimate | 6868597129 | | total_estimated_area |1373719425800 | **Expected behavior** Image successfully decoded **Additional information** `manhattan_distance` has an expected value of 200. As noted by @jonsneyers, "width estimate should be some small number like 16 or something" png: ![art.png](https://user-images.githubusercontent.com/69643766/232892400-bdb17366-5406-4f8b-9a07-2b2a371c6d92.png) jxl: ![art.jxl](https://user-images.githubusercontent.com/69643766/232891931-51e183dd-371f-4e09-9b32-8936e956763e.png) ``` Width 200 Height 200 Bitdepth 8 Spline 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 50 50 100 150 150 150 EndSpline - Set 0 ``` <!-- 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 -->
splines: Decoding error due to high `total_estimated_area_reached` value
https://api.github.com/repos/libjxl/libjxl/issues/2400/comments
1
2023-04-18T20:15:43Z
2024-03-04T10:12:56Z
https://github.com/libjxl/libjxl/issues/2400
1,673,772,703
2,400
[ "libjxl", "libjxl" ]
**Describe the bug** I converted an animated GIF file to JXL, and then played the JXL file, but I found that it has artifacts. I also converted the JXL to APNG, but even the APNG has artifacts. **To Reproduce** 1. `cjxl test.gif test.jxl` 2. Play `test.jxl` in Gwenview 3. `djxl test.jxl test.apng` 4. `mpv test.apng` **Expected behavior** No artifacts during playback, the animation should look the same as the GIF input. **Screenshots** ![screenshot](https://user-images.githubusercontent.com/103918092/232707409-6ec67a9b-4b55-43f9-b1d1-6f53ae471d85.png) **Environment** Arch Linux x86_64 `v0.8.1 c27d4992 [AVX2,SSE4,SSSE3,Unknown]` GIF: Created in GIMP 2.10.34. **Test files** [test-files.zip](https://github.com/libjxl/libjxl/files/11259171/test-files.zip)
After converting animated GIF to animated JXL, the JXL output is buggy (artifacts during playback)
https://api.github.com/repos/libjxl/libjxl/issues/2392/comments
2
2023-04-18T07:45:43Z
2025-01-19T00:50:13Z
https://github.com/libjxl/libjxl/issues/2392
1,672,545,929
2,392
[ "libjxl", "libjxl" ]
**Describe the bug** I am trying to reproduce #2363 with cjxl, in which I need to convert a float32 buffer to jxl. Since OpenEXR is not correct supported anymore #1804, I tried pfm. **To Reproduce** I am using the following code to generate pfm files: ``` import cv2 import numpy as np buffer = np.load("1.npy") cv2.imwrite("1.pfm", buffer) ``` Running cjxl gives ``` $ cjxl 1.pfm 1.jxl JPEG XL encoder v0.8.1 0.8.1 [AVX2,SSE4,SSSE3] Read 1536x1536 image, 9437200 bytes, 568.5 MP/s Encoding [VarDCT, d1.000, effort: 7], ./lib/jxl/encode.cc:265: Only JXL_BIT_DEPTH_FROM_PIXEL_FORMAT is implemented for float types. ./lib/jxl/encode.cc:1848: Invalid input bit depth JxlEncoderAddImageFrame() failed. EncodeImageJXL() failed. ``` Example files are attached here: [Archive.zip](https://github.com/libjxl/libjxl/files/11255630/Archive.zip) **Expected behavior** No Error. **Environment** - OS: MacOS / Homebrew - CPU type: x86_64 - cjxl/djxl version string: `cjxl v0.8.1 0.8.1 [AVX2,SSE4,SSSE3]` **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 -->
pfm is not supported with cjxl: Only JXL_BIT_DEPTH_FROM_PIXEL_FORMAT is implemented for float types.
https://api.github.com/repos/libjxl/libjxl/issues/2391/comments
2
2023-04-17T20:49:19Z
2024-05-21T14:08:38Z
https://github.com/libjxl/libjxl/issues/2391
1,671,944,889
2,391
[ "libjxl", "libjxl" ]
I attach the log, it is huge to quote. (Notice, this is in Rosetta, so if something relies on physical cpu detection instead of compiler-passed settings, it may fail.) **Environment** - OS: macOS 10.6.8 Rosetta - Compiler version: gcc 12.2.0 - CPU type: ppc (emulated) [libjxl_tests_macOS_ppc.txt](https://github.com/libjxl/libjxl/files/11249767/libjxl_tests_macOS_ppc.txt)
A number of tests fail on ppc32: 69% tests passed, 1077 tests failed out of 3488
https://api.github.com/repos/libjxl/libjxl/issues/2390/comments
1
2023-04-17T11:52:18Z
2024-04-22T09:39:32Z
https://github.com/libjxl/libjxl/issues/2390
1,671,000,971
2,390
[ "libjxl", "libjxl" ]
![image](https://user-images.githubusercontent.com/41775496/232370086-4896d8e3-2839-4485-afd6-2924ced717bf.png) After two days of pressure testing and decoding, it leaked over 100 M and used version 0.8.1
Decoding seems to have a memory leak
https://api.github.com/repos/libjxl/libjxl/issues/2386/comments
2
2023-04-17T03:21:54Z
2023-04-23T08:34:44Z
https://github.com/libjxl/libjxl/issues/2386
1,670,334,933
2,386
[ "libjxl", "libjxl" ]
![image](https://user-images.githubusercontent.com/41775496/232368732-8979dc38-f294-4c19-970a-5ca44546e232.png) After two days of pressure testing and decoding, it leaked over 100 meters and used version 0.8.1
Decoding seems to have a memory leak
https://api.github.com/repos/libjxl/libjxl/issues/2385/comments
0
2023-04-17T03:13:50Z
2023-04-17T03:18:15Z
https://github.com/libjxl/libjxl/issues/2385
1,670,330,272
2,385
[ "libjxl", "libjxl" ]
For certain non-photographic images (e.g., pixel art), `cjxl`’s defaults produce files that are factors larger than the original inputs. This contradicts the claim that [“The JPEG XL reference encoder (cjpegxl) produces, by default, a well-compressed image that is indistinguishable from (or, in some cases, identical to) the original.”](https://cloudinary.com/blog/how_jpeg_xl_compares_to_other_image_codecs#fool_proof_default_quality) As a motivating example, see the PNG file and resulting JPEG-XL in https://github.com/libjxl/libjxl/issues/2381. The input PNG is 3.9 MB; the output JXL, generated via defaults (`$ cjxl input.png output.jxl`), is 16 MB — more than 4x larger. This is because the input is pixel art, which VarDCT inefficiently encodes. Using JPEG-XL lossless encoding produces a much more reasonable output (1.4 MB) but requires that the user knows this fact and manually uses `--quality=100`. **Proposed solution** It would be great if libjxl/cjxl’s default behavior automatically chooses between lossy (`-q 90`) or lossless (`-q 100`) compression, depending on which provides the better output. Aside from creating great default results always, it wouldn’t give any erroneous fodder to claims of poor jxl performance!
For best results encoding non-photographic images, default behavior should automatically choose between lossy and lossless
https://api.github.com/repos/libjxl/libjxl/issues/2382/comments
7
2023-04-15T03:26:29Z
2023-04-19T09:43:55Z
https://github.com/libjxl/libjxl/issues/2382
1,669,125,720
2,382
[ "libjxl", "libjxl" ]
**Describe the bug** I’ve attached a sample PNG file (3.9 MB) that, when compressed by `cjxl` using defaults, results in a 16 MB jxl file (also attached). Note that I’ve had to split the output jxl file into two pieces to accommodate GitHub’s file size limits. To reconstruct the output jxl file, `cat` the two pieces together. The SHA-256 is `ae08800074b745a1a2f0faec7ae4ff893f1f5d4279443810371d388804197e91`. **To Reproduce** ``` $ cjxl reddit-place-2022.png reddit-place-2022.jxl JPEG XL encoder v0.8.1 0.8.1 [NEON] Read 6000x6120 image, 4096280 bytes, 358.2 MP/s Encoding [VarDCT, d1.000, effort: 7], Compressed to 16288694 bytes (3.549 bpp). 6000 x 6120, 4.69 MP/s [4.69, 4.69], 1 reps, 10 threads. $ du -sh reddit-place-2022.* 16M reddit-place-2022.jxl 3.9M reddit-place-2022.png ``` **Expected behavior** Output JXL file should be smaller, or at least same size, as input. Definitely not >4x larger. **Screenshots** Please see attached files. **Environment** - OS: macOS 13.2.1 - Compiler version: Installed via Homebrew formula from tap - CPU type: apple arm - cjxl/djxl version string: cjxl v0.8.1 0.8.1 [NEON] ![reddit-place-2022-input](https://user-images.githubusercontent.com/1744438/232173534-bc3f6dae-2251-44a7-9bff-d26be9185c8c.png) ![reddit-place-2022-output-part1](https://user-images.githubusercontent.com/1744438/232173703-f73f2d72-6a88-4a42-84b8-a80d9b3c5bdc.jpg) ![reddit-place-2022-output-part2](https://user-images.githubusercontent.com/1744438/232173713-60406a8c-7068-4c55-9b76-4a3e6f2aa5e3.jpg)
Compressing a sample PNG file results in a 4x-sized file
https://api.github.com/repos/libjxl/libjxl/issues/2381/comments
7
2023-04-15T00:25:42Z
2023-04-15T03:28:03Z
https://github.com/libjxl/libjxl/issues/2381
1,669,074,564
2,381
[ "libjxl", "libjxl" ]
**Is your feature request related to a problem? Please describe.** libjxl has a very good JPEG decoder, but in order to use it, one must first transcode to JXL and then decode the resulting JXL. Example: ``` cjxl input.jpg intermediary.jxl && djxl intermediary.jxl output.png ``` **Describe the solution you'd like** It would be better if this could be done directly: ``` djxl input.jpg output.png ``` **Additional context** JPEG XL decoder v0.9.0 d72e266c [AVX2] Ideally, this is a feature of libjxl, not just djxl. It could check the signature and if it sees `0xFF D8` it should automatically switch to the JPEG decoder.
djxl/libjxl should be able to decode JPEG files that are recompressible with JXL, but it cannot
https://api.github.com/repos/libjxl/libjxl/issues/2371/comments
3
2023-04-11T17:36:25Z
2023-05-04T08:51:39Z
https://github.com/libjxl/libjxl/issues/2371
1,662,946,035
2,371