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

toktx error: JPGD_UNEXPECTED_MARKER #750

Open
rawnsley opened this issue Aug 17, 2023 · 2 comments
Open

toktx error: JPGD_UNEXPECTED_MARKER #750

rawnsley opened this issue Aug 17, 2023 · 2 comments

Comments

@rawnsley
Copy link

rawnsley commented Aug 17, 2023

toktx (v4.0.0~6) fails when compressing this JPEG.

% 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, but I couldn't tell at a glance if you are using this decode library.

@MarkCallow
Copy link
Collaborator

MarkCallow commented Aug 19, 2023

We're using the same decoder so this is probably the same issue as you pointed at. Do you also see this only on a Nexus 3 or on other devices?

Neither toktx nor the new ktx create tool support loading files (of any format) with ICC color profiles so even if the JPGD_UNEXPECTED_MARKER is fixed you will not be able to create a texture from this file. You will have to use an image processing tool to convert it to a known colorspace.

@rawnsley
Copy link
Author

@MarkCallow The files were saved in Adobe Lightroom, which I'm guessing is where the color profile was added. I've added some more examples to the related issue in the upstream library. I understand about the ICC color profile restriction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants