Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Mar 24, 2024
1 parent 68f740b commit 26cb611
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Drivers/Gd/Modifiers/TrimModifier.php
Expand Up @@ -20,6 +20,8 @@ public function apply(ImageInterface $image): ImageInterface
throw new NotSupportedException('Trim modifier cannot be applied to animated images.');
}

// apply tolerance with a min. value of .5 because the default tolerance of '0' should
// already trim away similar colors which is not the case with imagecropauto.
$trimmed = imagecropauto(
$image->core()->native(),
IMG_CROP_THRESHOLD,
Expand Down

0 comments on commit 26cb611

Please sign in to comment.