Closed Ukhryuk-Hai closed 1 month ago
I assume you mean "convert" when saying "open"?
This seems like a problem with JPEGLI. Temporarily switch the encoder to ImageMagick.
Unfortunately, there are rare cases where JPEGLI fails to process an image. The program uses cjpegli.exe
from libjxl
if you'd like to verify it.
I can't access the file to verify it myself. I suggest using GoFile or sending it to me via email at: contact@codepoems.eu
Here is the link.
Temporarily switch the encoder to ImageMagick.
How can i do this?
I assume you are talking about losslessly recompressing this JPEG into a JPEG XL file. cjxl
produced the following output:
Encoding [JPEG, lossless transcode, effort: 7]
Error while decoding the JPEG image. It may be corrupt (e.g. truncated) or of an unsupported type (e.g. CMYK).
EncodeImageJXL() failed.
I'm afraid there is nothing I can do about it.
I assume you are talking about losslessly recompressing this JPEG into a JPEG XL file
Yes exactly. Why can't I use another decoder for such files? Or can convert them silently to RGB.
Because a different transcoder does not exist. The only alternative is to use the official library, but doing that in Python directly is not possible. There are no quality bindings available either. This also won't guarantee the image would process correctly.
Perhaps you could substitute a different decoder while using libjxl
itself, but my program isn't doing that directly.
It's not something I can do, unfortunately.
Upon further investigation, the file appears to be corrupted. Even ExifTool refuses to write it:
$ exiftool -all= <file_name>
Error: JPEG EOI marker not found - <file_name>
0 image files updated
1 files weren't updated due to errors
However, these files open perfectly in different image viewing programs and do not have any visual defects anywhere. Here is an example of such an image; there are 230 photos in this series, and the converter cannot process only one.
I suggest adding some JPG decoders and if an error occurs, try using them. Of course, it would be desirable for this situation to be displayed in the log.