Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jpegli encoding failed for black png #3560

Open
anenasa opened this issue May 7, 2024 · 3 comments
Open

jpegli encoding failed for black png #3560

anenasa opened this issue May 7, 2024 · 3 comments
Labels
bug Something isn't working jpegli Related to jpegli, also cjpegli and djpegli unrelated to 1.0 Things that need not be done before the 1.0 version milestone

Comments

@anenasa
Copy link

anenasa commented May 7, 2024

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 e148959 [AVX2,SSE4,SSE2]

Additional context
Add any other context about the problem here.

@mo271 mo271 added bug Something isn't working unrelated to 1.0 Things that need not be done before the 1.0 version milestone jpegli Related to jpegli, also cjpegli and djpegli labels May 7, 2024
@ropucyka

This comment was marked as off-topic.

@Traneptora
Copy link
Contributor

Traneptora commented May 10, 2024

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

@eustas
Copy link
Contributor

eustas commented May 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jpegli Related to jpegli, also cjpegli and djpegli unrelated to 1.0 Things that need not be done before the 1.0 version milestone
Projects
None yet
Development

No branches or pull requests

5 participants