KhronosGroup / KhronosGroup/KTX-Software
toktx error: JPGD_UNEXPECTED_MARKER
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 317
- Avg merge
- 20h 12m
- Merged PRs (30d)
- 3
Description
`toktx` (v4.0.0~6) fails when compressing [this JPEG](https://github.com/KhronosGroup/KTX-Software/assets/303516/4e10a2e3-eb22-4412-b2b6-7850c0d516d5).
```
% toktx bad-image.ktx bad-image.jpeg
toktx: failed to create image from bad-image.jpeg. JPEG decode failed
```
I got slightly more info when running in a different environment:
```
JPEG decode failed: JPGD_UNEXPECTED_MARKER
```
As far as I can tell the JPEG is well formed. GIMP says it has a color profile, which I know is a problem when compressing PNG files, but I have never had the problem with JPEGs before and the error message is opaque.
Possibly related to [this issue](https://github.com/richgel999/jpeg-compressor/issues/4), but I couldn't tell at a glance if you are using this decode library.
Contributor guide
Research direction
Start by reproducing the failure with the reported `toktx bad-image.ktx bad-image.jpeg` command and the linked JPEG asset. Trace the JPEG decoding path that emits `JPGD_UNEXPECTED_MARKER`; done means the reported JPEG is converted successfully and the failure behavior is covered or clearly explained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100