Skip to content

Fix image dimensions in CLI JSON output and debug message - #280

Merged
robertknight merged 1 commit into
mainfrom
fix-json-image-dims
Oct 5, 2026
Merged

robertknight merged 1 commit into
mainfrom
fix-json-image-dims

Conversation

@robertknight

@robertknight robertknight commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Fix an issue where the output of ocrs image.png --json had incorrect values for the image_width and image_height fields.

The image tensor has shape [height, width, channels], but the JSON output used shape()[1..], reporting [width, channels] as the image height and width. The --debug message had a similar issue, printing channels x width instead of width x height.

Fixes #279

The image tensor has shape [height, width, channels], but the JSON
output used `shape()[1..]`, reporting [width, channels] as the image
height and width. The `--debug` message had a similar issue, printing
channels x width instead of width x height.

Fixes #279

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robertknight
robertknight merged commit fe568af into main Oct 5, 2026
2 checks passed
@robertknight
robertknight deleted the fix-json-image-dims branch October 5, 2026 07:33
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.

Incorrect image dimensions in JSON output

1 participant