tirr-c / jxl-oxide

Pure Rust implementation of JPEG XL decoder
Apache License 2.0
280 stars 12 forks source link

What happens if `-o` is not specified? #286

Open clairem-sl opened 5 months ago

clairem-sl commented 5 months ago

A question because it's not described clearly in --help.

If I run, for instance:

jxl-oxide decode Bellisseria_ALL.composited.2024-04.jxl

I got the following output:

2024-04-11T15:06:51.313102Z  INFO jxl_oxide_cli::decode: Image dimension: 19968x24576
2024-04-11T15:08:54.111736Z  INFO jxl_oxide_cli::decode: Took 122790.85 ms
2024-04-11T15:08:54.114465Z  INFO jxl_oxide_cli::decode: No output path specified, skipping output encoding

Does this mean jxl-oxide has successfully decoded the JPEG-XL image but exited because no output is specified?

The main reason I'm asking this is because in my workflow, I verify JPEG-XL encoding using cjxl has been successful by then running djxl afterwards like so:

djxl $JXL_FILE - --output_format ppm > /dev/null

So if running jxl-oxide decode $JXL_FILE works the same, then jxl-oxide can be yet another tool in my toolbelt.

tirr-c commented 5 months ago

Yes, it decodes the image to pixels and exits immediately. Note that djxl can do the same thing via --disable_output.