mirror of
https://github.com/Intervention/image.git
synced 2025-08-29 08:40:33 +02:00
Fix bug in Imagick driver's CropModifier
This commit is contained in:
@@ -36,7 +36,7 @@ class CropModifier extends DriverSpecializedModifier
|
|||||||
);
|
);
|
||||||
|
|
||||||
// cover the possible newly created areas with background color
|
// 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(
|
$draw->rectangle(
|
||||||
$originalSize->width() + ($this->offset_x * -1),
|
$originalSize->width() + ($this->offset_x * -1),
|
||||||
0,
|
0,
|
||||||
@@ -47,7 +47,7 @@ class CropModifier extends DriverSpecializedModifier
|
|||||||
}
|
}
|
||||||
|
|
||||||
// cover the possible newly created areas with background color
|
// 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(
|
$draw->rectangle(
|
||||||
0,
|
0,
|
||||||
$originalSize->height() + ($this->offset_y * -1),
|
$originalSize->height() + ($this->offset_y * -1),
|
||||||
|
Reference in New Issue
Block a user