1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-28 16:19:50 +02:00

Fix bug in Imagick driver's CropModifier

This commit is contained in:
Oliver Vogel
2024-01-08 12:39:56 +01:00
parent 1dbc598bcf
commit 32ee26ff49

View File

@@ -36,7 +36,7 @@ class CropModifier extends DriverSpecializedModifier
);
// cover the possible newly created areas with background color
if ($crop->width() > $originalSize->width()) {
if ($crop->width() > $originalSize->width() || $this->offset_x > 0) {
$draw->rectangle(
$originalSize->width() + ($this->offset_x * -1),
0,
@@ -47,7 +47,7 @@ class CropModifier extends DriverSpecializedModifier
}
// cover the possible newly created areas with background color
if ($crop->height() > $originalSize->height()) {
if ($crop->height() > $originalSize->height() || $this->offset_y > 0) {
$draw->rectangle(
0,
$originalSize->height() + ($this->offset_y * -1),