libjxl icon indicating copy to clipboard operation
libjxl copied to clipboard

jpegli encoding failed for black png

Open anenasa opened this issue 9 months ago • 3 comments

Describe the bug I tried to encode black png generated with imagemagick convert but failed:

$ cjpegli c.png o.jpg 
Read 100x100 image, 260 bytes.
Encoding [YUV d1.000 AQ p2 OPT]
jpegli encoding failed

To Reproduce Steps to reproduce the behavior: cjpegli c.png o.jpg Expected behavior jpg created by cjpegli

Screenshots Test image: c

*Environment *

  • OS: Linux
  • Compiler version: gcc 13
  • CPU type: x86_64
  • cjxl/djxl version string: cjxl v0.10.2 e1489592 [AVX2,SSE4,SSE2]

Additional context Add any other context about the problem here.

anenasa avatar May 07 '24 05:05 anenasa

JpegXL team Transfer the development to other people, you are not competent, the project is not moving forward and is infested with bugs. You are useless and are committing sabotage (possibly paid) to implement this standard in everyday life. The standard was removed from the Chrome browser because of you, because of too long development and protracted work to eliminate bugs in the implementation.

ropucyka avatar May 10 '24 05:05 ropucyka

Here's an update from a debug build:

leo@gauss ~/Downloads :) $ umbrielpng 328402633-06cf92c9-8117-423c-a2b5-1c84bccd0462.png 
PNG signature found: 328402633-06cf92c9-8117-423c-a2b5-1c84bccd0462.png
Chunk: IHDR, Size: 25, Offset: 8, CRC32: 5899a8f9
Chunk: bKGD, Size: 14, Offset: 33, CRC32: dd8a13a4
Chunk: tIME, Size: 19, Offset: 47, CRC32: 19d61c72
Chunk: IDAT, Size: 32, Offset: 66, CRC32: 2971b9fc
Chunk: tEXt, Size: 49, Offset: 98, CRC32: 7c9d47d1
Chunk: tEXt, Size: 49, Offset: 147, CRC32: 0dc0ff6d
Chunk: tEXt, Size: 52, Offset: 196, CRC32: c78fc682
Chunk: IEND, Size: 12, Offset: 248, CRC32: ae426082
Size: 100x100, Color: 1-bit Grayscale
leo@gauss ~/Downloads :) $ cjpegli -d 1 328402633-06cf92c9-8117-423c-a2b5-1c84bccd0462.png test.jpg
Read 100x100 image, 260 bytes.
Encoding [YUV d1.000 AQ p2 OPT]
./lib/extras/enc/jpegli.cc:72: JXL_FAILURE: Only full bit depth unsigned types are supported.
./lib/extras/enc/jpegli.cc:368: JXL_RETURN_IF_ERROR code=1: VerifyInput(ppf)
jpegli encoding failed

Traneptora avatar May 10 '24 14:05 Traneptora

Will take a look. Likely we need to add an option to change bit-ness it this case.

eustas avatar May 15 '24 08:05 eustas