improve helpfulness of jpeg error #10686
Closed
+5
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think this is the second time I have found myself tracing back the code to lib/tjpgd/src/tjpgd.c:
before realizing that I needed to uncheck the progressive option when creating my JPEG file for CircuitPython.
This PR adds the progressive hint from the core comment to the reported gifio error. It does also increase the message size a little so I considered catching the error in the adafruit_imageload library decoder.open call, adding the "progressive" hint and then re-raising the error but I think that would add the hint to more unrelated errors than the core update does.
I'm happy to go the library route if the additional string storage is problematic.