Closed AlexanderProd closed 2 months ago
We switched to an entirely different jpeg decoder in the 0.25 release. Might be worth seeing if the problem still happens there?
We switched to an entirely different jpeg decoder in the 0.25 release. Might be worth seeing if the problem still happens there?
I just tried it with 0.25.1 and the error is different but still not able to decode the image.
Error extracting data: Format error decoding Jpeg: "Error decoding SOF Marker, Number of components cannot be zero."
In that case, you could try opening an issue against https://github.com/etemesi254/zune-image (the error you are seeing is coming from the zune-jpeg
crate). That error looks suspiciously like there might actually be a problem with your image, but perhaps it is something recoverable, or some feature that isn't implemented
The image is of type jpeg ls (https://jpeg.org/jpegls/), which is currently not supported by the decoder
I'm trying to decode a jpeg image from a thermal camera, the binary information is retrieved from
exiftool
.guess_format
detects it to be of Jpeg format, which I guess is correct.Unfortunately decoding it fails with this error:
Error extracting data: Format error decoding Jpeg: invalid JPEG format: JPGn(7) marker found where not allowed
.I'm quite certain that the jpeg data is valid and not corrupted. When I do the same operation in python, decoding the result from
exiftool
, using thedecode
function from the libjpeg library I get the pixel information.I have made sure, by generating a SHA checksum, that the the binary information I'm sending to
decode
in python is the same as in Rust.Also, the
Jpeg
struct from the img-parts crate can be properly created from this binary using thefrom_bytes
method.You can download the binary from here https://drive.google.com/file/d/1itK8DpyGjXvQL_rcuM2tIMCqBCiV6nk4/view?usp=drive_link the SHA-512 checksum should be
e3cce4b1883f97b398e3219ccc4931ecbb201aa9b339a624f7c6cc78a81ce54d7e452eb7627ea85c7ed3ca892b34ad9fbf1af03f55dbc1db734d47192238e65e
I'm using image version 0.24.6 with rust 1.77.2 on macOS 14.5.