jwagner / jwagner/smartcrop-cli
Cropped images are sometimes 1 pixel too small
- Dominant language
- JavaScript
- Stars
- 329
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
`smartcrop --width 100 --height 400 %1 %~n1_out%~x1`
When I run this command on kitty.jpg from the test suite, the output image is 99x400.

I assume this happens because of the skewed aspect ratio of the requested crop, I've encountered a similar "missing pixel" problem when cropping in Photoshop. Is there a way to force exact dimensions for the output?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the reported smartcrop command against kitty.jpg from the test suite and trace how requested crop dimensions become the output size. Confirm the behavior for 100x400 crops and add coverage showing that the resulting image has exactly the requested dimensions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100