1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-26 23:35:12 +02:00

Fix bug in GD driver's CropModifier

This commit is contained in:
Oliver Vogel
2024-01-08 12:34:37 +01:00
parent a0337c2dc4
commit 1dbc598bcf

View File

@@ -63,13 +63,12 @@ class CropModifier extends SpecializedModifier
);
imagealphablending($modified, false); // do not blend / just overwrite
// imagecolortransparent($modified, $transparent);
imagefilledrectangle(
$modified,
$offset_x * -1,
$offset_y * -1,
$targetWidth,
$targetHeight,
$targetWidth - $this->offset_x - 1,
$targetHeight - $this->offset_y - 1,
$transparent
);
@@ -87,8 +86,6 @@ class CropModifier extends SpecializedModifier
$targetHeight
);
imagealphablending($modified, true);
// set new content as recource
$frame->setNative($modified);
}