Skip to content

Fix 1px background line when using focal point cropping - #455

Merged
ADmad merged 1 commit into
thephpleague:masterfrom
lazerg:fix/issue-451-focal-point-crop-rounding
Jul 15, 2026
Merged

Fix 1px background line when using focal point cropping#455
ADmad merged 1 commit into
thephpleague:masterfrom
lazerg:fix/issue-451-focal-point-crop-rounding

Conversation

@lazerg

@lazerg lazerg commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Focal point cropping rounds the resize dimensions down, so the scaled image can end up a pixel short of the crop and leaves a 1px background line along an edge. Rounding up instead makes the scaled image fully cover the crop.

Fixes #451

@lazerg

lazerg commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

hey @ADmad, mind taking a look when you have a moment?

@ADmad
ADmad merged commit 231001e into thephpleague:master Jul 15, 2026
8 checks passed
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.

Rounding issue when using focal point cropping results in 1px white line

2 participants