Skip to content

Conversation

@IgorSusmelj
Copy link
Contributor

Changes

  • Fixed a bug in jpg dimension parsing. In get_jpeg_dimensions(...) we try to only read the first few bytes to obtain the correct width and height of a jpeg image. This failed for certain files as we treated a DHT table start as a marker which resulted in some non sense dimensions.
  • We now have an explicit list of jpg SOF (start of frame) markers that we check for. If the given jpg file does not any of them we move on and use pillow to properly decode the image and then get the dimension.
  • We added more unit tests to catch the issue.

@michal-lightly michal-lightly merged commit b7b3612 into main Dec 2, 2025
2 checks passed
@michal-lightly michal-lightly deleted the support-more-markers-for-size-reading-is branch December 2, 2025 09:26
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

Successfully merging this pull request may close these issues.

3 participants