isAnimated()) { throw new NotSupportedException('Trim modifier cannot be applied to animated images.'); } $imagick = $image->core()->native(); $imagick->trimImage(($this->tolerance / 100 * $imagick->getQuantum()) / 1.5); $imagick->setImagePage(0, 0, 0, 0); return $image; } }